UPDATE
Asked the question on the PhpStorm site.
When I press Ctr + Shift + N to navigate in my project files it can only find some off my files in the directory. So most off the files do not belong to the project. How to make it so my directory with all the files becomes 1 project again?
Also it looks like some off the files are on C:\Users\Username\Projects\Website and other files are on Z:\Projects\Website
It's a short question I hope I explained it right, and if I need to give more information about something ask/tell me. (also I don't know which tags I have to use)
If someone is experiencing this problem with the PhpStorm 2021 version, try these steps:
Close the IDE.
Go the project directory and delete .idea folder.
Restart the IDE.
For me, the IDE created a new .idea folder and recognized all files as the part of the project.
Did you try reopening the project? That sometimes does solve my problems.
Related
I'm running Linux Mint. My existing projects are located at the /var/www/* folders. But when I'm trying to create a new project then the PhpStorm's file browser is not showing me that folder at all. Like there is just no /var/www folder, but I know it is there and is having a full access permissions (0777).
In addition it shows for example a folder /var/data/JetBrains which is not actually available in my system (terminal: cd /var/data - no such file or directory).
So it seems like it is showing some kind of its own /var folder (virtualized?), not the one that is actually in my system. How can I solve this problem, how can I make it so it use my system's /var folder?
Solved. Do not install the PhpStorm from the Mint's software manager. It comes there in some kind of wrapper that isolates the filesystem.
I am currently working on a project which requires PhpStorm and WebStorm to work in a single directory. However, the issue is that their respective .idea directories collide.
Is there any way to solve this issue?
I tried updating, I tried removing .idea folders from the projects. I even deleted my whole settings folder from users/User in Windows. Last one helped, but I had to import my old settings, there is just far too much changed for me to redo everything, problem reappeared.
While indexing, PhpStorm shows the node_modules folder. Right after it finishes, the folder disappears. I have no scopes set up, I have not excluded the folder.
I followed this issue PhpStorm hides directories in Project window and it didn't help.
If I setup node_modules as a source folder from the Directories settings, and then choose "Project Files" from the Project View, then and only then I can see it in the sidenav... This is driving me nuts...
I disabled "Vue for Idea" plugin and node_modules reappeared. I feel so stupid right now....
Thanks to Alexandre Martini in the comments. He gave me a hunch.
This shit drove me crazy to - Go to File > Settings > Frameworks > Javascripts > Libraries and make sure you have a library setup pointing to your project's node_modules folder and the visibility is enabled. This link helped me.
[How to configure WebStorm / PhpStorm project so that JS code intelligence works well for Node.js projects?
I have a java project in Intellij and use Hg/Mercurial for version control. I ignored some files with this .hgignore file
syntax: glob
target/*
.idea/*
*.iml
and deleted all these files which was committed before. but now I can't execute my project, cause it can not find the file misc.xml.
What should I do?
Updated answer for IntelliJ 14+: File-> New-> Project from Existing Sources... (choose your project directory) and follow the wizard Q&A.
Restarting Intellij should fix the problem. Just make sure you click on the "Import Project" pop-up that appears on the top right.
At first, you shouldn't really ignore everything under .idea but instead only .idea/workspace.xml and .idea/tasks.xml, as it JetBrains states: http://devnet.jetbrains.com/docs/DOC-1186
To solve your problem and get your project back to working state there are possibly two solutions:
Checkout the last commit that contains the files under .idea folder with
hg checkout SHA,
where SHA is the commit id.
After that reset your working space to the head:
hg reset HEAD
Edit your .hgignore in the way that was recommended before, add project files to stage, and commit them:
hg commit -am "Reverted project settings"
If there is no commit with the project settings, you can just import your code back.
Start Intellij IDEA and choose "Import Project". Choose the folder with your code, and choose the appropriate SDK after.
I met this problem when I did rm -rf project command, then when I git clone a new project to my working space, maybe quit the idea and then import the project again. This can easily solve this
I have found that for this error and also for some other cases where the IDE project behavior is inconsistent with command line behavior, the following often helps: close the project's Intellij IDEA window, delete .idea/, and open the project again. IntelliJ often flashes up a message saying it didn't find a project root but generally this disappears after a few seconds and IntelliJ automatically rebuilds the .idea directory.
Recreating the .idea folder
File -> Close project
File -> Open -> Choose pom.xml under the project folder -> Open as project -> Delete existing project and import
I am try to keep separate workspace directory and code directories in my php project and sweating to understand/find how this could be achieved. A couple of revisions back I tried phpStorm and found that it does not provide such feature.
I just want to know if phpstorm 6.0 has this feature or still lacking it ? If possible please help me out.
Work Around
File > Settings >[Directories]
+[Add Content Root] to add external directory
Assuming that you have created project separate from code.Some of the tool might not work
as expected
This works for linux using sshfs, sorry for windows users.
I've created this folder structure in my pc
/mnt/remote_code/code/
And i have to mount code from server like this
sshfs user#server:/var/www/server_code/ /mnt/remote_code/code/
Code from server will be mounted in code folder
In PS I open this directory: /mnt/remote_code/
So, that means PS will create this folder /mnt/remote_code/.idea (indexing and saving all project and ide settings), and keeps the code folder (with remote code inside) without changes.
Hope it help you.
Greetings.