Welcome folks today in this blog post we will be looking on how to manage different node.js versions in windows using NVM software. All the steps are shown below.
What is NVM?
NVM (Node.js Version Manager) is the utility software specifically made for managing different versions of Node.js. In cases if you want to upgrade or downgrade different Node.js versions. You can install any node.js version and use it.
NVM Installation
Now to install the NVM Software in windows you need to go to https://github.com/coreybutler/nvm-windows/releases. And select the latest version setup as shown below
Now this setup file will be downloaded. Now to install this software this process is very simple. Just press the next buttons to install the software as shown below in the images
Command Line Usage
After installing it. Now it’s time to use this software on the terminal it’s very easy first of all open command line in windows using administrative privileges as shown below.
Check current Node.js Version
node -v
1 |
node -v |
Installing Different Node.js & NPM Version in NVM
Now we will be installing different node.js and npm version using nvm in terminal as shown below
In the command we are using the command as shown below
nvm install 15.0.0
We are installing a different node.js version which is 15.0.0. And then in the next step we need to make this version as default version and use it
Use the Installed Node.js Version in NVM
Now we will force the Node.js to use that installed version to be default and use this version for future as shown below
As you can see we are using the below command to use the installed version as default
nvm use 15.0.0
For this command to work you must be a administrative user and also started command line as administrative user as we shown in the earlier step. Now you can safely use this node.js version.
List all Installed Node.js Versions Using NVM
Now we will be seeing the different nodejs versions installed inside the system using nvm command
nvm ls
Uninstall Node.js version
Now we will look on how to remove or uninstall any node.js version which is present inside your system.
nvm uninstall <version-number>
nvm uninstall 15.0.0