Error starting WebStorm with IntelliJ .iml files (vars MAVEN_REPOSITORY, JAVA_MODULE)

I'm working on a project where I have been using WebStorm to edit Javascript files, and have recently started using IntelliJ community edition to edit a larger project with Java code.  The overall project is a parent directory of the javascript directory.  WebStorm has created a .idea directory at the root of the webapp, and IntelliJ created a .idea file in the parent directory.

This seemed to work OK for about 2 weeks, but now I get a bunch of errors when I start up WebStorm:

4:25:05 PM Unknown Module Type
           Cannot determine module type for the following modules:

           "cms-bootstrap-configuration" (type 'JAVA_MODULE')
           "cms-bootstrap-content" (type 'JAVA_MODULE')
           "cms-cms" (type 'JAVA_MODULE')
           "cms-site" (type 'JAVA_MODULE')
           "quorum" (type 'JAVA_MODULE')
           "textchatserver" (type 'JAVA_MODULE')
           "videochatclient" (type 'Flex')
           "videochatserver" (type 'JAVA_MODULE')
           All mentioned modules will be treated as Unknown modules.
4:25:05 PM Load error: undefined path variables
           MAVEN_REPOSITORY is undefined. Fix it
           Path variables are used to substitute absolute paths in WebStorm project files and allow project file sharing in version control systems.
           Some of the files describing the current project settings contain unknown path variables and WebStorm cannot restore those paths. (show balloon)

And then when I switch between WebStorm and IntelliJ, I get a dialog like this:

Project Files Changed
Project components were changed externally and cannot be reloaded:
Would you like to reload the project?

WebStorm seems to change a bunch of config files in the parent .idea directory of the IntelliJ project, a bunch of xml files are edited, removing <javadoc> elements (which seem to mention the MAVEN_REPOSITORY variable) and changing a bunch of files that contain NewModuleRootManager configs (that mention a JAVA_MODULE var).

Is there any way to get these two tools to play fair together?

1 comment
Comment actions Permalink

The problem is that WebStorm and Idea use the same project format (,  but have different module types, settings, etc. For example, WebStorm  knows nothing about "JAVA_MODULE" module type - it has no providers to  handle it. WebStorm supports a single module type - "WEB_MODULE".  Moreover, it doesn't allow creating multiple modules in a single  project. So, it's strongly recommended to avoid sharing the project settings (.idea) between WS and Idea.

If you like to proceed with working on your project in both IDEs, I can  suggest creating a separate project to be used in WebStorm: create a new  empty WebStorm project anywhere and then add a folder where your  javascript, HTML, etc. files are stored as an additional content root to  it using Settings/Project/Directories, Add content root.


Please sign in to leave a comment.