- 1 year ago
WINDOWS : How can I get NVM to work on multiple integrated terminals in VS Code at once?
To get NVM (Node Version Manager) to work on multiple integrated terminals in Visual Studio Code (VS Code) at once, you can use the following steps:
Install NVM on your system if you haven't already. You can download the installer from the NVM GitHub repository.
Open VS Code and open a new terminal by pressing the "Ctrl + `" (backtick) keys.
Run the following command in the terminal to install the desired version of Node.js using NVM:
phpnvm install <node-version>
Replace
<node-version>
with the version of Node.js you want to install. For example,nvm install 14.17.0
.Run the following command to set the installed version of Node.js as the default version:
perlnvm use <node-version>
Verify that the correct version of Node.js is installed and active by running the following command:
node -v
Repeat steps 2-5 for each additional terminal you want to use with NVM.
Note that when you open a new terminal in VS Code, it will not automatically use the version of Node.js set as default by NVM. You will need to run the nvm use <node-version>
command again in each terminal to activate the desired version.
Alternatively, you can use the nvmrc
file to automatically set the version of Node.js for each project. Simply create a .nvmrc
file in the root of your project and add the desired version number. Then, when you open a new terminal in VS Code, NVM will automatically set the version of Node.js based on the .nvmrc
file.