How to use the node_modules which is lower in the hierarchy

I have a lot of projects on NodeJS. Therefore, I have only 1 folder with node_modules (bc I don't want 20 same folders), and I create all projects like this:

node_modules
├──project 1
├──project 2
...
├──project 10

But when I open project 1 in WebStorm, it doesn't see these modules. Is it possible to let the IDE understand where this folder is?

0
2 comments

You can try setting NODE_PATH environment variable pointing to your folder location in Node.js run configuration template: Run | Edit Configurations..., expand Templates node, select Node.js configuration, specify NODE_PATH in Environment variables field

Please see https://youtrack.jetbrains.com/issue/WEB-19476#focus=streamItem-27-2819977.0-0

0

I tryed :( I added NODE_PATH  and restart IDE. Then created new configuration, but unsuccessfully

0

Please sign in to leave a comment.