How to install Node Version Manager (NVM) for Windows 10?
Tags: javascript, 100daysofcode, codenewbie, node
Published: 2020-09-08 06:02:51

# Introduction

I had recently purchased a Windows 10 laptop and I wanted to install Node.js. I usually prefer to use a Node Version Manager to install Node.js. 

The reason I choose to do that is because I usually have to work with multiple applications that need require different Node.js versions, and using a node version manager (NVM) it is very easy to switch versions.

This article is more of a user guide for folks who are interested to install a Node Version Manager for Windows 10 Operating System.

### A Quick Look at the Key Terminologies

I wanted to mention the following terminologies for absolute beginners. So, feel free, to skip this section, if you are already familiar.

- nvm - Node Version Manager. It is a tool that allows you to download and install Node.js. It allows you to pick and choose the Node.js version that you wish to use.

- Node.js - It is a platform for running JavaScript applications.

- npm - Node Package Manager. It is a tool that allows you to install JavaScript packages. npm comes along with Node.js. So, if you have installed Node.js, you'll have npm installed as well.

# Installing NVM for Windows 10

## Go to the nvm-windows Git Repository

- Using your browser navigate to the Git repository for nvm-windows located [over here.](https://github.com/coreybutler/nvm-windows/releases)

- Click on the 'nvm-setup.zip' link from the 'assets' table as shown in the image below.

![1-url.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1599507373531/asaEHG1Y8.png)

## Locate the Zip File & Extract

- The Zip file should have been downloaded to your Downloads folder (or where ever you have configured your downloads to be saved).

![2-zip.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1599508433728/kaIiNhv9E.png)

- Unzip/Extract the contents to the same folder.


![3-extract.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1599508463597/QmtGd6z7q.png)


![4-extract2.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1599508469811/-3g_HVrdo.png)

- You should have the file nvm-setup.exe extracted in the same folder.

![5-executable.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1599508525445/WIxb8bblV.png)

## Install NVM

- Double-Click on the executable file to launch the installer.

- Choose 'I accept the agreement' option.

![6-accept.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1599508584824/uTMybv1qC.png)

- Select destination to install.

![7-pathtoinstall.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1599508645333/c1AgsxH1m.png)

- Select Symlink for Node.js. 

![8-symlink.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1599509016613/y_DaPnBi8.png)

- Click on Install & once it completes, click on the 'Finish' button.

![9-install.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1599509075111/eFaviNrtx.png)


![10-finish.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1599509064992/rEjtRnxBz.png)

## Confirm that the 'NVM' successfully installed

- Open your command line terminal

- Type the below command to verify if your nvm installation was successful.

```js
$ nvm --version
```

![11-checknvm.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1599509445634/CwrXoWsAL.png)

## Install npm

- You can now install 'npm' using the following command.

```js
  $ nvm install latest 
  //installs the latest version of npm

  $ nvm install <<version number>> 
  //e.g. nvm install 12.6.8 to install a specific npm version

```

- Let us install the latest version of npm. (As of Sep 2020)

![12-installnpm.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1599509702399/OYi05XrhT.png)

## Specify the version of npm that you choose to use

- Using the below command to specify the version of npm that you wish to use. In our case, since we have only one version installed. Let's go with that.

```js
$ nvm use 14.9.0
```

![13-usenpm.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1599510064957/2MM9A7uvH.png)

## Check npm & nodejs versions

- You can confirm the nodejs and npm versions through the commands below.

```js

//Check Node.js version
$ node --version

//Check npm version
$ npm --version

```

![14-checknpmnode.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1599510145510/8IwVeHxNE.png)

## Install Another npm Version

- Repeat the above steps

![15-installdiffversion.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1599510190613/JhnOvrv6B.png)

- Install Completed & Select the version using the 'nvm use' command

![16-finishinstall.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1599510230226/qtXu-AH96.png)


![17-useversion.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1599510285207/IxqJYFR1e.png)

- Confirm that the environment now points to the new Node.js and npm versions

![18-confirmversion.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1599510323214/iSGsBe9Wk.png)


## List all Versions

- You can use the nvm list command to list all the npm and Node.js versions installed.

```js
$ nvm list
```

![19-listversions.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1599510364651/l_nkT6aVC.png)

# Conclusion

I hope the detailed user-guide helped you setup the Node Version Manager (nvm) in your Windows 10 machine. Thank you for reading the article and do share it if you found it useful.

<span>Cover Photo by <a href="https://unsplash.com/@wocintechchat?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Christina @ wocintechchat.com</a> on <a href="https://unsplash.com/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></span>

### You may also like:

- [IIFE - Immediately Invoked Function Expressions](https://dev.to/skaytech/iife-immediately-invoking-function-expressions-1164)
- [ES6 - Spread Operator](https://dev.to/skaytech/es6-spread-operator-3ced)
- [A Basic Introduction to Webpack](https://dev.to/skaytech/a-basic-introduction-to-webpack-4eke)
- [ES6 => Arrow Functions](https://dev.to/skaytech/es6-arrow-functions-2m0l)
- [ES6 - Understanding Destructuring](https://dev.to/skaytech/es6-understanding-destructuring-49np)
- [Why do you want to work for us?](https://dev.to/skaytech/why-do-you-want-to-work-for-us-interview-question-demystified-1gh2)
- [Understanding Closures](https://dev.to/skaytech/understanding-closures-1501)
- [What is 'this' in JavaScript](https://dev.to/skaytech/what-is-this-in-javascript-3d3i)
- [Docker Fundamentals](https://dev.to/skaytech/docker-fundamentals-2ibi)