Visual Studio Code to use node version specified by NVM

后端 未结 17 1184
渐次进展
渐次进展 2020-12-07 16:01

Is it possible for VS Code to use node version specified by NVM?

I have 6.9.2 installed locally. Even after switching to another version, from the OS X terminal (no

17条回答
  •  -上瘾入骨i
    2020-12-07 16:54

    The solution is to set alias default. In the OS terminal run -

    nvm alias default 7.8.0

    Open vscode, now running node -v returns 7.8.0

    It seems vscode takes up this (alias default) value and not the node version that is set by nvm use X.X.X

    Restart VS code for it to pick up the changes.

    Update (12/04/2018) - This solution might not work for everyone. Please see below answers for other solutions.

提交回复
热议问题