When running an NPM script from the script explorer, it uses NVM's default version of node. Instead, I'd like to use the version dictated by .nvmrc. Is that possible?
Asked
Active
Viewed 271 times
1 Answers
0
There are several extensions that run nvm use
on each terminal opened if an .nvmrc file is found in the workspace. These work for the NPM Script Explorer too.
The most downloaded one is called vsc-nvm.
In case it does not work out of the box, note that it runs nvm use
in a /bin/sh
shell, therefore you need to make sure nvm is accessible and works as intended from within sh.
P.S. This sounds like a good feature to add to the NPM Script Explorer itself, but as far as I can see, nobody suggested it yet.

Dorin Botan
- 1,224
- 8
- 19