Reputation: 3094
With my last restart of my mac I had a problem with IntelliJ IDEA project : the .iml file was deleted and I have
Error loading project: cannot load module cars-service Details ....
in the console.
Besides that, the structure view of the project has disapeared. Here is a screenshot:
Upvotes: 46
Views: 52698
Reputation: 96
you can fix it by select your pom file. right click and then reimport
Upvotes: 1
Reputation: 4163
Closing intelliJ. Deleting the .idea folder and re-opening intellij worked for me.
Upvotes: 31
Reputation: 101
The error has nothing to do with gems. Please try deleting the .idea directory and using "Open Directory" on the same directory again to recreate it.-- Dmitry Jemerov
↑an answer on intellij-support.jetbrains.com
This helped me. I just closed Pycharm, then delete .idea directory , then I open Pycharm again, and the error disappeared.
Upvotes: 10
Reputation: 9728
Had a similar issue with PHPStorm (which is also idea based), caused by a renaming of my project. Solution was simple: I just needed to remove the corresponding line for the module declaration in file <project-directory>/.idea/modules.xml
. Re-opening the project was not needed as it seemed to me, but I did it anyway.
Have had this issue with PHPStorm 2017.1.3.
Upvotes: 4
Reputation: 1191
This happened to me this morning*, and fortunately there's a fairly straightforward solution.
Ctrl+Alt+Shift+S
(or go to File > Project Structure...
) and click Modules
on the left of the window.+
above the list of modules then New Module
. Select the type of module (Java, Android, Flash, what have you) and click Next
.(*I... got a bit gung-ho with the old git clean -fd
. I don't recommend it.)
Upvotes: 11
Reputation: 3094
Finally, I imported my project via import project so the iml file was recreated.
Upvotes: 45
Reputation:
IML file is necessary to load the project.
Locate the folder the .iml file used to be in > right click > Local history > show history.From there you should be able to restore that iml file
Upvotes: 3