"Cannot determine module type ("WEB_MODULE")" - error message on startup
I've recently been setting up a rather large (and unfortunately private) cmake project for use in CLion and I'm getting a strange error at starting, which I think is prohibiting any further code parsing:
3:07:15 PM Unknown Module Type
Cannot determine module type ("WEB_MODULE") for the following module:"mason"
The module will be treated as a Unknown module.
Then I'm also seeing that no folders are detected (with highlights) in the project navigator, and the code errors don't show up - yet it still builds (both in CLion and from the command line). Has anyone seen something like this before? While I can't share the repo publically, I've attached the main CMakeLists.txt and the only one that it includes. There are also a bunch of subdirectory dependencies, and these all work fine on their own.
Not sure if this is a bug on my part, so figured I would ask here before raising an issue.
Thanks,
Rich
Attachment(s):
libmason.cmake.zip
CMakeLists.txt.zip
Please sign in to leave a comment.
Hi Rich.
Could you please specify if you've tried open your project with other JetBrains IDE previously? Please try closing CLion, remove .idea and reopen your project again. Does that help?
Ah, that was it! I had previously opened the project with WebStorm at the base repo directory, using it as an editor for glsl and dart files. Now the "WEB_MODULE" string makes sense to me. Everything is working correctly after deleting the .idea folder and re-opening the project in CLion.
Should I report this to the issue tracker? Perhaps CLion should detect that the folder has been previously opened by a different JetBrains IDE and prompt the user on what to do about it?
Thanks for the help,
Rich
Some of these cases have been reported in our tracker already (for other IDEs), but they can't be fixed because of the platform restrictions. In general, the opening mixed-language project in the single-language IDEs and vice versa is not supported. Usually we recommend switching to IntelliJ IDEA Ultimate Edition for polyglot projects. But it isn't the solution for CLion, becuase there is no plugin for Intellij IDEA yet.
The limitations and decision to not 'officially' support opening up mixed source projects makes sense to me (although it tends to work quite nicely, much better than with other IDEs). My suggestion was more about how to indicate to the user what the problem is in a clearer way, since they likely won't understand what "Cannot determine module type ("WEB_MODULE")" means, yet the IDE itself could be educated on this term and inform the user that the project was previously opened with WebStorm and they should remove the .idea folder to proceed (or even better, ask user if it can replace the .idea folder for them).
Happy to be rocking CLion on this large project now, it's doing great. :)
I've been getting this issue on both PHPStorm and DataGrip. I know that I can manage SQL in PHPStorm, but I prefer to do it in DataGrip on my second monitor.
How can I stop this from coming up?
Thanks!
Ok