NVM (Node Version Manager): A Simple Guide for Developers
As JavaScript development is progressing very rapidly, many libraries and frameworks are being built on top of it, such as React, Vue, and…
NVM (Node Version Manager): A Simple Guide for Developers
As JavaScript development is progressing very rapidly, many libraries and frameworks are being built on top of it, such as React, Vue, and others. Most modern projects adopt these libraries and frameworks, which require specific versions of Node.js. At the same time, many legacy projects still rely on older Node.js versions, while newer projects use the latest ones. Managing multiple Node.js versions on the same machine can therefore become difficult. This is where NVM (Node Version Manager) comes in to help.
What Is NVM?
NVM is a command-line tool that lets you:
- Install multiple Node.js versions
- Switch between Node versions per project
- Set a default Node version
- Avoid breaking old projects when Node updates
It works on macOS, Linux, and Windows (via nvm-windows).
Why Do You Need NVM?
Here are some common real-world scenarios:
- One project needs Node 14, another requires Node 18
- Legacy apps break when Node is upgraded globally
- Open-source projects specify a strict Node version
- CI/CD pipelines fail due to version mismatches
With NVM, you can switch Node versions in seconds — no reinstalling required.
Installing NVM
macOS / Linux
Run the following command in your terminal:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
You can also check the latest version on GitHub here: GitHub — nvm-sh/nvm: Node Version Manager — POSIX-compliant bash script to manage multiple active node.js versions
Then restart your terminal and verify:
nvm --version
Windows
For Windows, install nvm-windows from:
https://github.com/coreybutler/nvm-windows
After installation, verify:
nvm version
Common NVM Commands
Install a Node.js version
nvm install 18
Use a specific Node version
nvm use 18
List installed versions
nvm ls
List available Node versions
nvm ls-remote
Set a default Node version
nvm alias default 18
You can use these commands in the .envrc file. For more details, you can refer to this article: Using .envrc on macOS: A Simple Guide | by Muzzammil Alam | Jan, 2026 | Medium
메타데이터
- post_id
- 6ee53d2cf8b0
- slug
- nvm-node-version-manager-a-simple-guide-for-developers-6ee53d2cf8b0
- url
- https://medium.com/@muzzammilalam/nvm-node-version-manager-a-simple-guide-for-developers-6ee53d2cf8b0
- canonical_url
- https://medium.com/@muzzammilalam/nvm-node-version-manager-a-simple-guide-for-developers-6ee53d2cf8b0
- author_url
- https://medium.com/@muzzammilalam
- status
- ok
- fetched_at
- 2026-06-12 18:14:10