← All open source projects

nvm

nvm-sh/nvm

nvm is a POSIX-compliant Node.js version manager for installing, switching, and pinning different Node versions in shell environments.

Forks 10,223
Author nvm-sh
Language Shell
License MIT
Synced 2026-06-09

What it is

nvm solves a constant JavaScript development problem: different projects require different Node.js versions. An old service may need Node 18, a new tool Node 22, and an experiment Node 24.

nvm is installed into the user shell environment and called from the command line. It works in POSIX-compliant shells such as bash and zsh on Unix, macOS, and Windows through WSL.

What is inside and how people use it

Inside are shell scripts, installer, tests, and documentation for profiles, mirrors, completion, Docker, and troubleshooting. It is a PATH and Node-version management layer.

Switching Node versions

This example shows the normal cycle: install a version, switch to it, and verify the result.

Language: Bash
nvm install 24
nvm use 24
node -v

# в проекте с .nvmrc
nvm use

A typical flow is entering a project, running `nvm use`, getting the right Node version, installing dependencies, and not breaking other projects. `.nvmrc` helps teams pin the version.

Strengths and limitations

The strength is simplicity and familiarity. nvm does not require changing the whole system and fits daily development well.

The limitation is shell-profile dependence. If `.zshrc` or `.bashrc` is unusual, nvm may not load. On Windows without WSL, another manager is needed.