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:

├──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?


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


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


Please sign in to leave a comment.