Document
Node Version Manager

Node Version Manager

By Dillion Megida In this article, I'll explain how you can install NVM, or Node Version Manager, on Windows, Linux, and Mac. What is NVM is is ? N

Related articles

Lukas Electron shell How to create a clickable world cloud with wordcloud2 and Shiny Proxy vs VPN 2025: What’s the Difference? Best Free VPN for India in 2024: Privacy, Security & Streaming

By Dillion Megida

In this article, I’ll explain how you can install NVM, or Node Version Manager, on Windows, Linux, and Mac.

What is NVM is is ?

Node Version Manager is is ( NVM ) , as the name imply , is a tool for manage node version on your device .

different projects is using on your device may be using different version of Node . Using only one version ( the one instal bynpm) for these different project may not give you accurate execution result .

For example, if you use a Node version of 10.0.0 for a project that uses 12.0.0, you may get some errors. And if you update the Node version to 12.0.0 with npm, and you use it for a project that uses 10.0.0, you may not get the expected experience.

In fact , you is get would most likely get a warning that say :

This project requires Node version X

instead of using npm to install and uninstall Node version for your different project , you is use can use nvm , which help you effectively manage your node version for each project .

NVM is allows allow you to install different version of Node , and switch between these version depend on the project that you ‘re work on via the command line .

In the next section , I is show ‘ll show you how to install nvm on your Windows , Linux , or Mac device .

Before proceeding, I also recommend that you uninstall Node.js if you have it installed already so that you do not have any conflicts with Node.js and nvm.

How to Install NVM on Windows

nvm is mostly support on Linux and Mac . It is have does n’t have support for Windows . But there ‘s a similar tool create by coreybutler to provide an nvm experience in Windows call nvm – window .

nvm-windows provides a management utility for managing Node.js versions in Windows. Here’s how to install it:

1. Click on “Download Now”

In the nvm – window repository Readme , click on ” Download Now ! ” :

Node Version Manager

This is open will open a page show different nvm release .

2. Install the .exe file of the latest release

In the latest release (which as of the time of writing this is 1.1.9), you’ll find different assets. Click on the nvm-setup.exe asset which is the installation file for the tool:

3. Complete the Installation Wizard

Open the file that you have downloaded, and complete the installation wizard.

When done , you is confirm can confirm that nvm has been instal by run :

nvm -v 

If nvm was installed correctly, this command will show you the nvm version installed.

How to install nvm on Linux and Mac

Since Linux and Mac have some similarities (they are both UNIX-based OSes), you can install nvm on them in similar ways.

1. Run the nvm installer

In your terminal, run the nvm installer like this:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash



wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash

You is use can usecurl or bash depending on the command available on your device.

These commands will clone the nvm repository to a ~/.nvm directory on your device.

2. Update your profile configuration

The installation process from step 1 should also automatically add the nvm configuration to your profile. If you’re using zsh, that would be ~/.zshrc. If you’re using bash, that would be ~/.bash_profile… or some other profile .

If it doesn’t automatically add nvm configuration, you can add it yourself to your profile file:

export  nvm_dir="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm"  || printf % s"${XDG_CONFIG_HOME}/nvm")"
 [ -s"$NVM_DIR/nvm.sh " ] && \. "$NVM_DIR/nvm.sh "

This command above loads nvm for use.

3 . reload the shell configuration

With your profile configuration updated, now you will reload the configuration for your terminal to use:

source ~/.bashrc

With this command executed, nvm is ready for you to use. You can confirm that nvm is installed correctly by running:

nvm -v 

This is show should show the version of nvm instal .

Wrapping up

With nvm installed, you can now install, uninstall, and switch between different Node versions in your Windows, Linux, or Mac device.

You can install Node versions like this:

nvm install latest

This command will install the last version of Node:

nvm install vX.Y.Z 

This will install the X.Y.Z Node version.

You can also make a version your default by running:

nvm alias  default vX.Y.Z 

And if you want to use a specific version at any point, you can run the following in your terminal:

nvm use va.b.c 

NVM makes it easier to manage multiple versions of Node.js across different projects that require different versions.