---
title: "Install NVM on Windows and Take Control of Node Versions"
description: "Easily learn to take control and switch between NodeJS versions and install NVM on Windows in this ATA Learning tutorial!"
canonical: "https://adamtheautomator.com/install-nvm-on-windows/"
---

# Install NVM on Windows and Take Control of Node Versions

> Easily learn to take control and switch between NodeJS versions and install NVM on Windows in this ATA Learning tutorial!

Source: https://adamtheautomator.com/install-nvm-on-windows/

---

ATA Learning

Tap to hide

[

ATA Learning

](/)

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Search for:  

*   [](https://twitter.com/adbertram)
*   [](https://github.com/Adam-the-Automator)
*   [](https://www.linkedin.com/company/adam-the-automator-llc)
*   [](/feed/)

![Install NVM on Windows and Take Control of Node Versions](https://adamtheautomator.com/wp-content/uploads/2022/11/Install-NVM-on-Windows-and-Take-Control-of-Node-Versions.jpg)

# Install NVM on Windows and Take Control of Node Versions

[![](https://secure.gravatar.com/avatar/2788bb1a3f735603f81eca51d68daec56a9d97e805a10268fb2c20afcc76b81b?s=192&d=mm&r=g)Nicholas Xuan Nguyen](https://adamtheautomator.com/author/nicholas-xuan-nguyen/)22 November 20225 min. read

Categories: [DevOps](/category/devops/)

Tags:[NodeJS](/tag/nodejs/)[Windows](/tag/windows/)

Table of Contents

*   [Prerequisite](#prerequisite)
*   [How to Download and Install NVM on Windows](#how-to-download-and-install-nvm-on-windows)
*   [Configuring the PATH Environment Variable for NVM](#configuring-the-path-environment-variable-for-nvm)
*   [Using NVM to Install Multiple Versions of NodeJS](#using-nvm-to-install-multiple-versions-of-nodejs)
*   [Installing the Latest Version of Node.js](#installing-the-latest-version-of-nodejs)
*   [Installing the Latest LTS Version of Node.js](#installing-the-latest-lts-version-of-nodejs)
*   [Installing a Specific Version of Node.js](#installing-a-specific-version-of-nodejs)
*   [Switching Between Multiple Versions of Node.js](#switching-between-multiple-versions-of-nodejs)
*   [Running a Simple Hello World Program](#running-a-simple-hello-world-program)
*   [Conclusion](#conclusion)

Are you having trouble switching between different versions of Node.js as your build your project? Let Node Version Manager (NVM) save the day. Install NVM on Windows and save yourself the trouble of managing multiple Node.js versions.

Installing and using NVM can be a bit tricky, especially on Windows. But in this tutorial, you will learn how to install and use NVM on Windows to install different versions of Node.js.

Read on, and switch between Node.js versions without the hassle!

## Prerequisite

This tutorial will be a hands-on demonstration. To follow along, be sure you have the following:

*   A Windows 10 computer with administrative privileges.
*   A code editor – This tutorial uses Visual Studio Code ([VS](https://adamtheautomator.com/visual-studio-code-tutorial/) Code), but you can use any code editor you are comfortable with.

Related:[The Visual Studio Code Tutorial Worth Learning](https://adamtheautomator.com/visual-studio-code-tutorial/)

## How to Download and Install NVM on Windows

Switching between Node.js versions should not be complicated, and NVM is up to the task. But before you can use NVM, you must download and install it on your machine.

To download and install NVM:

1\. Open your favorite web browser, navigate to the [official download page on GitHub](https://github.com/coreybutler/nvm-windows/releases), and find the latest version of the installer. At this time of writing, the latest version is 1.1.9.

2\. Scroll down to the **Assets** section of the GitHub page, and click **nvm-setup.exe** to download the NVM installer for Windows.

![Downloading the NVM installer for Windows](https://adamtheautomator.com/wp-content/uploads/2022/11/image-278.png)

Downloading the NVM installer for Windows

3\. Once downloaded, double-click the installer to run it.

4\. Now, choose the **I accept in the Agreement** option and click **Next** to accept the license agreement.

![Accepting the license agreement](https://adamtheautomator.com/wp-content/uploads/2022/11/image-279.png)

Accepting the license agreement

5\. Select a location for NVM to be installed, and click **Next**.

Note the location, as you will need it later if NVM does not work correctly.

![Selecting a location for NVM to be installed](https://adamtheautomator.com/wp-content/uploads/2022/11/image-280.png)

Selecting a location for NVM to be installed

6\. On the next screen, keep the settings as is and click **Next**. This setting lets you set the symlink directory, which is used to access NVM from the command line.

![Setting the symlink](https://adamtheautomator.com/wp-content/uploads/2022/11/image-281.png)

Setting the symlink

7\. Next, click **Install** to begin installing NVM.

![Installing NVM ](https://adamtheautomator.com/wp-content/uploads/2022/11/image-282.png)

Installing NVM

The installation process starts, and a status bar indicates progress.

![Viewing installation progress](https://adamtheautomator.com/wp-content/uploads/2022/11/image-283.png)

Viewing installation progress

8\. Once installed, click **Finish** to close the installer.

At this point, NVM is now installed on your Windows machine.

![Click Finish to close the installer.](https://adamtheautomator.com/wp-content/uploads/2022/11/image-284.png)

Click Finish to close the installer.

9\. Lastly, open PowerShell as administrator and run the below command to check NVM’s version installed.

```powershell
nvm -v
```

Related:[Discover How to Run PowerShell as Administrator](https://adamtheautomator.com/powershell-run-as-administrator/)

If NVM is installed correctly, you will see the version number of NVM printed on the screen, as shown.

![Checking the NVM version](https://adamtheautomator.com/wp-content/uploads/2022/11/image-285.png)

Checking the NVM version

## Configuring the PATH Environment Variable for NVM

The `nvm` command should successfully return NVM’s installed version. But what if you got an error instead, like the one below?

![Getting a ‘cmdlet not recognized’ error](https://adamtheautomator.com/wp-content/uploads/2022/11/image-286.png)

Getting a ‘cmdlet not recognized’ error

This error indicates the PATH environment variable is not configured correctly. The PATH environment variable is what tells your computer where to look for executable files like _nvm.exe_.

Related:[PowerShell Environment Variables: The Ultimate Guide](https://adamtheautomator.com/powershell-environment-variables/)

To fix this error, add the location of the NVM executable file to your PATH environment variable:

1\. Run the below command to set the PATH environment variable for NVM.

Replace `INSTALL_PATH` with the NVM executable file’s path you noted in step five of the “Downloading and Installing NVM for Windows” section.

```powershell
Setx path "%PATH%;INSTALL_PATH”
```

The output below shows setting the PATH environment variable for NVM is a success.

A restart might be required for the new PATH variable to take effect.

![Configuring the PATH environment variable](https://adamtheautomator.com/wp-content/uploads/2022/11/image-287.png)

Configuring the PATH environment variable

2\. Now, run the below command to recheck the version number of NVM.

```
nvm -v
```

As you can see below, the `nvm` command now works in checking your NVM version.

![Checking the version number of NVM](https://adamtheautomator.com/wp-content/uploads/2022/11/image-288.png)

Checking the version number of NVM

## Using NVM to Install Multiple Versions of NodeJS

Now that you have NVM installed and configured, you can use it to install multiple versions of Node.js side-by-side on your machine.

This feature is useful when working with projects requiring different versions of Node.js. For example, you can test a module you are developing without uninstalling the stable version of Node.js.

### Installing the Latest Version of Node.js

When installing tools or any packages, typically, you would choose to get the latest version.

Run the below command to download and `install` the `latest` version of Node.js.

```powershell
nvm install latest
```

You will see a similar output as below, which shows the latest version of Node.js (**19.0.0**) installed on your machine.

![Installing the latest version of Node.js](https://adamtheautomator.com/wp-content/uploads/2022/11/image-289.png)

Installing the latest version of Node.js

### Installing the Latest LTS Version of Node.js

The latest version of Node.js is not always the best choice for production environments. Why? The latest version might introduce breaking changes or might be unstable.

What are your other choices for installing Node.js? The Long Term Support (LTS) version of Node.js is most recommended for production environments. The LTS version is more stable and well-tested than the latest version.

Run the below command to `install` the LTS (`lts`) version of Node.js

```powershell
nvm install lts
```

Below, you can see the latest LTS version of Node.js installed, which is **18.12.0** at this time of writing.

![Installing the latest LTS version of Node.js](https://adamtheautomator.com/wp-content/uploads/2022/11/image-290.png)

Installing the latest LTS version of Node.js

### Installing a Specific Version of Node.js

What if you need to install a specific version of Node.js? Worry not. NVM lets you choose which version of Node.js to install without overwriting over ones currently installed on your machine.

Installing a specific version of Node.js is often required when working on an older project that is incompatible with the newer version of Node.js.

Run the following command to `list` all versions of Node.js that are `available` for installation via NVM.

```powershell
nvm list available
```

You will see a list of all the versions of Node.js that are available for installation below. Pick one version you wish to install.

![Listing of all the versions of Node.js](https://adamtheautomator.com/wp-content/uploads/2022/11/image-291.png)

Listing of all the versions of Node.js

Now, run the below command to `install` Node.js `v16.18.0` on your machine. But you can replace `v16.18.0` with your preferred version.

```powershell
nvm install v16.18.0
```

![Installing a specific version of Node.js](https://adamtheautomator.com/wp-content/uploads/2022/11/image-292.png)

Installing a specific version of Node.js

## Switching Between Multiple Versions of Node.js

Perhaps you are working on a project that requires Node.js v16.x and another project that requires Node.js v18.x. If so, how do you switch between Node.js versions?

Luckily, you can use NVM to switch between these two versions as needed quickly.

1\. Run the below command to see which version of Node.js is currently (`current`) in use.

```powershell
nvm current
```

Below, the output shows the current Node.js version in use is **v16.18.0**. Now all you need is the version you want to switch to. But first, you must check if that version is also installed on your machine.

![Checking which version of Node.js is currently in use](https://adamtheautomator.com/wp-content/uploads/2022/11/image-293.png)

Checking which version of Node.js is currently in use

2\. Next, run the following command to `list` all Node.js versions that are currently installed on your machine. `nvm list`

```powershell
nvm list
```

You will get an output like the one below, which shows all versions of Node.js installed.

![Listing all installed versions of Node.js](https://adamtheautomator.com/wp-content/uploads/2022/11/image-294.png)

Listing all installed versions of Node.js

3\. Finally, run the `nvm use` command below to switch to Node.js version `18.12.0`. Replace `18.12.0` with the actual Node.js version number to switch to.

```powershell
nvm use 18.12.0
```

![Switching to a different version of Node.js](https://adamtheautomator.com/wp-content/uploads/2022/11/image-295.png)

Switching to a different version of Node.js

## Running a Simple Hello World Program

Now that you have Node.js installed on your machine, you can try running a simple Hello World program to verify that everything is working as expected.

Create a new JavaScript file named `hello-world.js`

```powershell
New-Item hello-app.js
```

![Create a new file named hello-world.js](https://adamtheautomator.com/wp-content/uploads/2022/11/image-296.png)

Create a new file named hello-world.js

Open _hello-app.js_ in your preferred text editor, add the following code to the file and save and close the editor.

The code below prints the string `Hello World` to the console.

```powershell
var msg = 'Hello World';
console.log(msg);
```

Now, run the node command below to execute the `*hello-app.js*` script.

```powershell
node hello-app.js
```

If all goes well, you will see the **Hello World** message printed on the console, as shown below. This output confirms that Node.js has been successfully installed on your machine.

![Running a Simple Hello World Program](https://adamtheautomator.com/wp-content/uploads/2022/11/image-297.png)

Running a Simple Hello World Program

## Conclusion

Running and managing multiple versions of Node.js on the same machine can be a pain. But in this tutorial, you learned how to use NVM to install and manage different versions of Node.js on your machine.

Now that you have discovered how quickly you can switch between different versions of Node.js, would you consider NVM to level up your workflow?

Share this article

[Share on X](https://twitter.com/intent/tweet?url=https%3A%2F%2Fadamtheautomator.com%2Finstall-nvm-on-windows%2F&text=Install%20NVM%20on%20Windows%20and%20Take%20Control%20of%20Node%20Versions)[Share on Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fadamtheautomator.com%2Finstall-nvm-on-windows%2F)[Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fadamtheautomator.com%2Finstall-nvm-on-windows%2F)

## Related Posts

![](https://adamtheautomator.com/wp-content/uploads/2023/09/npm-on-windows.jpg)

### [How to Install Node.js and NPM on Windows](/npm-on-windows/)

Learn the ins-and-outs of NPM on Windows and take control of your Node.JS installation in this ATA Learning tutorial!

![](https://adamtheautomator.com/wp-content/uploads/2022/09/How-To-Install-And-Use-AWS-CLI-On-Windows.jpg)

### [How To Use and Install AWS CLI On Windows (The Perfect Way!)](/install-aws-cli-on-windows/)

With an AWS CLI install on Windows learn how to take advantage of command-line AWS functionality in this ATA Learning tutorial!

![](https://adamtheautomator.com/wp-content/uploads/2021/11/How-To-Use-Sets-in-Python.jpg)

### [How To Use Sets in Python](/sets-in-python/)

Learn how to use sets in Python to create, add, and manage data collections within code. Leverage data flexibility and learn to use sets in Python today!

## Categories

*   [IT Ops](/category/it-ops/)
*   [Cloud](/category/cloud/)
*   [DevOps](/category/devops/)
*   [Home Ops](/category/home-ops/)
*   [Information Security](/category/infosec/)
*   [Software Development](/category/software-development/)

## Site

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Copyright 2026© ATA Learning | [Privacy Policy](/privacy/)
