How to install NVM(Node Version Manager) on Windows
Tags: webdev, javascript, node, programming
Published: 2024-06-25 07:46:54

[NVM](https://github.com/nvm-sh/nvm) is a Node Version Manager used to manage multiple Node.js versions on systems.

## Why NVM Need?
NVM makes it easy to install and manage different Node versions on your machine or laptop, and you can switch between them whenever you need it from one node version to another based on your need. To switch to another version of node.js, you have to run a few commands, which I will explain in the below sections.

Suppose you have installed the specific version of node 18.0.0 on your machine, and you will get another project that project needs a higher or lower version of node.js (either node version 20.0.0 or 16.0.0 )to run the project on your machine but your system has node 18.0.0. So when you try to install packages and run the project you will get the Node version.

In the following sections, I’ll guide you through installing NVM on your Windows, Linux, or Mac device.

Before proceeding, I recommend uninstalling Node.js if you installed it to avoid conflicts between Node.js and NVM.

![Node version error](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ghxy62dk5mp2wsqattza.png)


## Installing NVM on Windows
NVM is primarily supported on Linux and Mac, but not on Windows. However, there’s a similar tool called [nvm-windows](https://github.com/coreybutler/nvm-windows) created by [Corey Butler](https://github.com/coreybutler), which provides a similar experience for managing Node.js versions on Windows.

## Below are the steps on how to install nvm-windows:

## 1. Download nvm-windows:
Go to the nvm-windows repository README file and click on the Download Now button, Or you can click here to Download. This will take you to a page with various NVM releases.

![nvm-windows download](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h6y7g5nudfots7sr0bxt.png)

## Download the NVM for Windows
2. **Install the .exe file:**
Once you are redirected to the release page (currently version 1.1.12) click on nvm-setup.exe and it downloads the nvm-windows on your machine.

![nvm-windows release page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ju2fuiow0ug24s6a3e7i.png)


3. **Run the installer:**
Open the downloaded file and follow the prompts to complete the installation wizard.

4. **Verify the installation:**
After installation, open a command prompt and run:

```
nvm -v
```
If everything is installed correctly, this command will display the installed NVM version.

NVM Commands for switching between Node versions:

To view available Node versions, run the following command:

```
nvm list
```
Now you can see what the list of node versions available in the machine looks like,


![NVM list command to see the list of node versions](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/639tc7bca8xh5vyc36mx.png)


If you want to select a specific version of the node.js that version is in the above list (screenshot image). Then run the below commands to select the particular node version and press enter.

Here I am selecting node version 14.17.1

```
nvm use v14.17.1
```
Verified selected node version:

```
node -v
```
then you will see the selected node version instead of the default one, here I have selected node 14 so it will show nod 14 for me.

What happens if the specified version of the node is not available then we have to install it using nvm command and then select it from the above steps.

To install a specific node version:

```
nvm install 20.0.0
```
Thank you for reading our article, I have tried to cover the all-important command and steps for more details visit the nvm-windows

Please like follow and share, I need your support!!
Thank you!!

Follow Me on:
[Linkedin](https://www.linkedin.com/in/sonu-k-76625a93/)
[Medium](https://medium.com/@me.sonu300)
[X(formally known as Twitter)](https://x.com/me_sonu300)