Intellij: Setting Remote host Mappings: Local path is out of project
Asked Answered
F

10

10

I am using Intellij IDea ultimate 15.

I want to compile/test/deploy on a remote host. So this is what I did: 1. File -> New -> Project -> Empty Project -> Specify project name/location

  1. Preferences -> Deployment -> add host(Test SFTP connection successfully)
  2. Modify mappings: set the Local path to the same as project location

Then it complains:

Local Path '[my local path]' is out of project

The path is the project location that I set to, it exists, and I have the right permission. So don't know why it complains.

Thanks for your time!

Foregoing answered 17/5, 2016 at 22:51 Comment(0)
N
7

I have just now done hit this problem myself, and came up with a solution. The problem is that in an empty project, if you open the project tree, you will see that there are no directories in your project.

If you open a "static web page" project, for example, you will notice that the directory is now a part of your project.

try doing the same thing, but in a "static web" project and the error will not occur any more

Noetic answered 5/6, 2016 at 14:23 Comment(4)
I really like this product, but I've lost way too much time to this unclear, undocumented issue... Your solution works great, thanks.Reopen
No problem Jeff. Good luck!Noetic
How is this a solution? I have existing files in the local path that is set that I need for my project. How can these possibly be out of project if my local path to the project is correct? I really love this IDE but there always seems to be some undocumented problem like this.Horned
7 years later - still an issue....... - and this workaround is still better than the product!Abdulabdulla
H
4

Check if the folder you want to exclude is not excluded from the project under Settings->Directories

Hernandez answered 15/5, 2018 at 11:28 Comment(0)
S
3

Configure your Projectdeployments and save this. Pay attention to correct paths! Then open "Directories" in the "Settings". Mark the baseline of your project as "Resource root" (required) and the other folders (as example - adjust to the project) as Sources. Apply and the problem is solved.

Sumach answered 25/4, 2017 at 6:24 Comment(1)
This worked for me, Settings >> Directories >> Add Content Root.Isomer
P
1

In Project Settings (via File -> Project Structure) assign your local project path as a new module path. On apply your subdirectories will be included in the Project Structure.

Pennsylvania answered 7/2, 2017 at 21:5 Comment(0)
J
1

I have just come across this problem. And I resolved it with restart the Intellij-IDE. And it works.....

Junkman answered 9/3, 2020 at 0:26 Comment(0)
J
0

I just had the same problem: Preferences --> Directories --> choose your project directory from the Directory list --> in the Mark as pane, click +Add Content Root. Worked for me.

Jabber answered 17/1, 2020 at 16:59 Comment(0)
E
0

In my case, with pycharm 2019.2 on Linux, the situation was that the project was opened in pycharm via a link (shortcut) in my home directory.

In Deployment Mapping, specifying the actual path (with the link path resolved) of a sub-directory within the project resulted in this error("Local path is out of project").

Supplying the unresolved path following the link(as used to open the project) resolved the issue.

The problem, it appears, is that the IDE simply checks if the local path specified in Deployment Mapping has the project root path as it's prefix (as a string; without the links/shortcuts being resolved to their actual paths).

By the way, the Deployment option in the context menu for the project sub-folder also remained disabled (greyed out) until this issue got resolved.

Endospore answered 8/9, 2020 at 13:5 Comment(0)
T
0

I used PHP Storm since 2013 and now still using then i were faced this issue many many times.

The problem is in your ".idea" directory. There're corupted "modules.xml" and "projectname.iml".

Solution: copy these files from other project, or just delete the .idea directory.

Please note after you copied from other project you need to rename current project, reconfig langagues & frameworks settings. It's stand-alone depend every project, it's does not have same contents normally

Tetramethyldiarsine answered 30/5, 2021 at 8:55 Comment(0)
C
0

make sure

"the local path:" ()

is sub dir of your goland IDE current opened project dir.

if you opened a project, but config the local path with a new dir, this error occur

Coraleecoralie answered 29/11, 2021 at 12:43 Comment(0)
G
0

I'm currently on PyCharm 2021.3 and ran into this issue.

Arno's solution is the closest, but perhaps outdated. In the current interface/GUI the steps are:

  1. Open Preferences
  2. Go to Project: <YOUR_PROJ_NAME>, then Project Structure
  3. Click the Add Content Root
  4. Navigate to your project's root directory and Open it

That should be it. It seems insane that you would need to do this, since you already did this when you opened the project. But, this is the solution.

Ganoid answered 11/1, 2022 at 2:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.