A POSIX-compliant bash script to manage multiple active Node.js versions via the command line.
nvm (Node Version Manager) is a command-line tool that allows developers to install, manage, and switch between multiple Node.js versions on their local machine. It solves the problem of version conflicts by enabling per-project Node version configuration and seamless switching, making it essential for developers working on multiple projects with different Node.js requirements.
Node.js developers, full-stack engineers, and DevOps professionals who need to manage multiple Node.js versions across different projects or environments, especially those working in teams or on legacy codebases.
Developers choose nvm for its simplicity, reliability, and deep shell integration. Unlike system-wide Node installations, nvm operates per-user without requiring sudo, provides automatic version switching via `.nvmrc` files, and offers robust features like offline installation and global package migration.
Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Installation is a single curl or wget command that automatically configures your shell, as shown in the README's install script, making setup quick and foolproof for most users.
nvm can automatically detect and switch Node versions based on .nvmrc files in project directories, with provided scripts for bash, zsh, and fish (via bass), streamlining multi-project workflows.
The --offline flag allows installing cached Node versions without an internet connection, which is explicitly documented for air-gapped environments or to avoid network latency.
Dedicated aliases and commands for LTS versions (e.g., lts/*) make it easy to install and use long-term support releases, with automatic alias updates from nodejs.org.
The --reinstall-packages-from flag enables seamless migration of npm packages when switching Node versions, reducing manual reinstallation effort during upgrades.
The README explicitly states nvm does not support Fish and lists third-party alternatives, indicating a gap in native compatibility that requires extra setup for Fish users.
Setting up nvm in Docker requires complex environment variable handling and manual sourcing, as detailed in the installation notes, which can be error-prone and not straightforward for automation.
Sourcing nvm scripts in shell profiles can slow down terminal initialization and cause compatibility issues with non-default settings, mentioned in troubleshooting sections for macOS and Linux.
nvm only works on Windows through WSL or emulation tools like Git Bash, not natively, which may require additional configuration and isn't ideal for pure Windows environments.