NVM
Node.js
JavaScript
Development Tools
Version Management
Programming
Web Development

What is NVM and How to Use It for Node.js Development

Deepak Tewatia
August 31, 2025
3 min read

What is NVM?

NVM stands for Node Version Manager. It is a tool that lets you manage different versions of Node.js on your computer. This is useful for developers who work on multiple projects that may require different versions of Node.js. With NVM, switching between these versions becomes easy and efficient.

Why Use NVM?

Here’s the thing: when you work on various projects, each project might depend on a specific version of Node.js. If you don’t use something like NVM, you could run into issues with compatibility. Some features might not work or your application might fail to run altogether. By using NVM, you can easily switch to the version you need, which helps keep your projects running smoothly.

How to Install NVM

Installing NVM is quite straightforward. Just follow these steps based on your operating system:

For macOS and Linux

  1. Open your terminal.
  2. Run the following command to download and install NVM:
  3. curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
  4. Close and reopen your terminal or run:
  5. source ~/.nvm/nvm.sh
  6. To check if NVM is installed, run:
  7. nvm --version

For Windows

Windows users can install NVM using a different package. Here’s how:

  1. Download the NVM installer from the NVM for Windows releases page.
  2. Run the installer and follow the instructions.
  3. After installation, open a command prompt and type:
  4. nvm version

How to Use NVM

Once you have NVM installed, you can start using it to manage your Node.js versions. Here are some basic commands to get you started:

Install a Node.js Version

To install a specific version of Node.js, use the following command:

nvm install 

Replace with the version number you want, like 14.17.0.

List Installed Versions

To see which versions of Node.js you have installed, run:

nvm ls

Switch Node.js Versions

If you want to use a different version, use:

nvm use 

Again, replace with the version you need, such as 16.3.0. This switches your active version to the one you chose.

Set a Default Version

If you usually work with one version, you can set it as the default:

nvm alias default 

Checking the Current Version

To see which version of Node.js is currently active, use:

node --version

Conclusion

Using NVM helps you keep your Node.js versions in check and makes your development process smoother. You can easily switch between versions as needed, which is ideal for managing different projects. Now that you know how to install and use NVM, give it a try and enjoy a better Node.js development experience.

Comments

Y
You
Commenting
0/2000
Loading comments…