Can't get rid of deleted module: "Error loading project: Cannot load module...would you like to remove from project?"

I was messing around and made a new project and deleted it manually (I assume I deleted the iml file) now no matter what I do, I can't figure out how to actually tell PHPStorm I want to get rid of this. Every time I load PHPStorm I get this error:

Cannot load module file 'C:/Users/mycomputer/PhpstormProjects/my-project/my-project.iml':
File C:\Users\mycomputer\PhpstormProjects\my-project\my-project.iml does not exist
Would you like to remove module 'my-project' from the project?

But if I click to remove, it still pops up on the next load.


I've tried invalidating caches and deleting .idea folders, and this particular folder no longer exists. How can I just get rid of this?



Comment actions Permalink

Try opening another project, then File | Open Recent | Manage Projects and remove the project from the list. Does it still pop up afterwards?

Comment actions Permalink

Delete the module reference from your-project/.idea/modules.xml

Comment actions Permalink

I fixed problem, where Idea was constantly trying to build in Sync view module that was deleted, rising error that folder is missing:

As latest gradle module, I had no fear to remove .idea/gradle.xml (actually I backed it up)

A have IntellijIdea 2020.1 idea-IC-201.6668.121


Comment actions Permalink

thanks worked -> would be nice to have this option in the error like "auto fix"


Please sign in to leave a comment.