Multi Language Project in 2 IDEs

I have a project that has a frontend and a backend.  The backend is django, and the frontend is react.  The project structure is as follows.

/
/.git
/frontend/src
/frontend/package.json
/frontend/node_modules
/api/manage.py
/api/djangoprojectname
/api/djangoprojectname/settings.py
/docs/
/.gitlab-ci.yml
/Dockerfile
/README.md

I intended to open the root of the project in PyCharm to work on the API, docs, Docker, and CI/CD, then open the root of the project in Webstorm to work on the frontend.

However, I'm running into weird issues when I open the project root in both apps.  Webstorm keeps saying PYTHON_MODULE not recognized, and I think the .idea folder keeps conflicting with itself. Also the project keeps switching between Webstorm and PyCharm in the Toolbox app, depending on which opened the folder last.

What would be the best way for this kind of project to be structured or opened with both apps to work on it?

 



1
1 comment

Idea-based IDEs (PHPStorm, WebStorm, PyCharm, IDEA, etc) have the same project format (.idea) but different settings/module types that aren't always compatible; in particular, all PyCharm projects have "PYTHON_MODULE" type, whereas in WebStorm all projects are of "WEB_MODULE" type, WebStorm has no providers to handle Python modules. As a result, you see errors about unknown module type when opening your project in different IDE.

If you like to work on the same sources in different IDEs, I'd suggest sharing the sources folder(s) but keeping the .idea folders separated: just create a new empty WebStorm project in preferred WebStorm-specific location and add your shared sources root as additional content root to it in Settings | Directories, Add Content root. Same thing should be done for PyCharm. As a result, you will have IDE-specific .idea folders and shared sources

0

Please sign in to leave a comment.