PROVIDER - The de facto Node.js version switcher

nvm

nvm manages Node.js versions through shell functions, covering 10+ years of releases with .nvmrc conventions, no root privileges and 1-second switches; its boundaries are Node-only scope, extra setup for non-interactive shells and the need for alternatives on Windows.

Developer Tools United States 2026.11.19
4.2pts

Detailed Notes

Pros 5 items

Installs and switches Node.js versions through shell functions, covering 10+ years of releases
Reads .nvmrc files so 1 command switches to the version a project declares
Keeps several Node versions on disk with switches completing within 1 second
Installs without root privileges since all versions live under 1 user directory path
The most widely adopted option, appearing in more than 90% of Node tutorials

Cons 4 items

Manages Node.js only, so polyglot setups need another tool
Depends on shell initialisation, which complicates non-interactive shells and containers
Native Windows is unsupported and needs alternatives such as nvm-windows
Switching is manual rather than automatic like Volta

Service Overview

nvm (Node Version Manager) is the most widely used Node.js version manager. It works as shell functions that install Node versions into the user directory and decide the active version by adjusting PATH.

In the development tools category it is the classic single-language version manager: narrow in scope but so widely adopted that most frontend and Node backend projects default to it.

Key Strengths

  • Complete coverage: installs releases spanning 10+ years
  • Friendly conventions: .nvmrc lets a project declare its version
  • No root: everything lives in the user directory
  • Fast switching: version changes land within 1 second
  • Ubiquitous: documentation and tutorials assume nvm

Product Ecosystem

Platform capabilities

Version install and uninstall, default version setting, aliases, .nvmrc reading, mirror configuration and version listing.

Integrations

Works with npm, yarn, pnpm, VS Code, GitHub Actions and frontend scaffolds.

Typical scenarios

Multiple frontend project versions, maintaining older projects and pinning Node in CI.

Limitations

  • Node.js only: polyglot projects need asdf or mise
  • Shell dependency: non-interactive shells and containers need extra setup
  • Windows gap: third-party implementations such as nvm-windows are required
  • Manual switching: not automatic like Volta

Use Cases

  • Frontend and Node projects (★★★★★): the most common choice
  • Maintaining legacy versions (★★★★★): broad historical coverage
  • Polyglot repositories (★★★☆☆): switch to asdf or mise
  • Container builds (★★★☆☆): base images with pinned versions are simpler

Pricing

Item Price Notes
nvm itself $0 MIT open source, commercial use allowed
Node downloads $0 Official mirrors are free
Commercial support None GitHub issues only

FAQ

How does nvm differ from n?

n is an npm global package requiring an existing Node, while nvm is a standalone shell function.

Why do I need nvm use in every new terminal?

nvm works by modifying the current shell's PATH; use .nvmrc with an auto-run snippet to simplify.

Is Windows supported?

Not natively; use nvm-windows or WSL.

Does it affect global npm packages?

Each Node version has its own global package directory, so reinstall after switching.

Code Examples

# Install nvm on macOS and Linux
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash

# Install and use a version
nvm install 20.11.1
nvm use 20.11.1
nvm alias default 20.11.1

# Switch according to .nvmrc in the project
echo "20.11.1" > .nvmrc
nvm use

Community & Resources

Visit nvm Website → https://github.com/nvm-sh/nvm
Visit Website ↗