'How to configure WebStorm to point to VM node interpreter

The JetBrains Vagrant plugin applied to WebStorm handles the starting and stopping of the VM just fine. My project node interpreter is configured on the VM. When configuring the project settings in WebStorm only local node interpreters are available.

I am able to ssh into the VM and work with the node project from the command line, like always, but I would really like to integrate the IDE, as otherwise it is just a test editor / terminal multiplexer, and I actually don't need it.

Is there something I am missing? On other Jetbrains products, ie PyCharm, the user is able to select the python interpreter from a vagrant vm, but it appears this is lacking on WebStorm.



Solution 1:[1]

It does not seem to be supported by WebStorm yet, but there is a workaround described a comment to the official documentation.

Solution 2:[2]

There is a way to do this now:

In your Run/Debug configuration, you can choose the Node interpreter, and more importantly, add one: press the ... button. Then you can add a remote interpreter, either

enter image description here

Then you can choose which you want to use:

enter image description here

However, I noticed a bug. This interpreter always uploads node_modules (could be gigabytes) to the remote interpreter. There is no way to turn it off, even if you do exclude it in the settings:

enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Alex Paliarush
Solution 2 Ben Butterworth