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.
4.2pts
Detailed Notes
Pros 5 items
Cons 4 items
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
- Source repository: https://github.com/nvm-sh/nvm
- Installation guide: https://github.com/nvm-sh/nvm#installing-and-updating
- Windows port: https://github.com/coreybutler/nvm-windows
Articles
- 01 Server Storage Selection: HDD, SSD & NVMe 08-06
- 02 GitLab CI/CD Best Practices: From Beginner to Production-Grade Pipelines 07-18
- 03 Prometheus Monitoring System Setup: From Metric Collection to Alert Notifications 07-18
- 04 Ansible Automation Ops Guide: From Configuration Management to Application Deployment 07-18
- 05 Docker Beginner Tutorial: From Installation to Containerized Web Deployment 07-18
- 06 API Integration Guide: REST vs GraphQL Comparison and Selection 07-18
- 07 GitHub Actions CI/CD Tutorial: Automated Build, Test, and Deployment 07-18
- 08 Docker Compose Multi-Container Deployment: Building Complete Application Orchestration 07-18
- 09 Kubernetes Deployment Guide for Beginners: Building a K8s Cluster from Scratch 07-18
- 10 Best VS Code Extensions 2026: Boost Your Development Productivity 07-18