NVM (Node Version Manager) is the command line utility for installing Node.js on your system. It allows us to install multiple Node.js versions and switching between them. This is helpful for the system running multiple Node application that required differnt-2 node versions.
This tutorial will help you to install and manage multiple Node.js versions on Windows using NVM.
How to Install NVM on Windows
The coreybutler has build the nvm installer for the Windows systems. Visit the below link to download the NVM installer for the Windows systems.
And download the nvm-setup.zip file of the latest version.
Extract the downloaded archive file on your system.
You will get a node-setup.exe file under the archive file. Double click the node-setup.exe file to begin the Node installation on Windows.
Follow the installation Wizard to complete installation of Node on Windows.
How to Install Node.js on Windows
As you have already installed the NVM on your system. Now, you can install any version of Node.js on Windows system. To install the most recent version use “latest” and to install latest stable version use “lts” with nvm install command.
- Use the following command to install most recent Node.js version
nvm install latest
- To install the latest stable version, execute the following command
nvm install lts
- You can also install a specific version like 14.15.0.
nvm install 14.15.0
You can follow the same commands to install multiple node versions on a single system.
Setup Default Node.js Version
You can change the default active Node version with the following command. For example, to setup Node 14.1.50 as default version, type:
nvm use 14.15.0
Once the new version activated, type:
This will show the current active Node.js version. See below screenshot:
Uninstall Node Version
You can remove unused older Node version’s from your system with the following command.
nvm uninstall 14.15.0
Change the version number as per your requirements. The above command will remove Node 14.15.0 from your system.
This tutorial helped you for installing NVM on Windows system. Also provides you commands to install specific Node.js version on Windows system.