GitHub

nvm-sh/nvm: Node.js Runtime Choice

A state-and-ownership model for shells, caches, packages, and platforms

8 chapters73 min total
Keywords
nvm-sh/nvmNode.jsShellPATH.nvmrcLTSnpmCachingAliasesTrust
Overview

This series explains how nvm-sh/nvm turns version intent—from exact releases and LTS labels to .nvmrc files—into installed, validated Node.js trees and shell- or child-process environments. It separates resolution, acquisition, activation, package isolation, platform limits, metadata hardening, mirror trust, and maintenance so teams can choose explicitness and know when nvm is not a system-wide policy service.

Learning outcomes
  • nvm makes Node.js version choice local and reversible by changing a shell or child process, not a system-wide installation.
  • Exact selectors narrow drift; partial versions, aliases, and LTS labels can resolve differently as local state or release metadata changes.
  • Resolution, acquisition, validation, and activation are separate states, so a failure at one stage needs a stage-specific remedy.
  • Version-specific global package trees reduce cross-runtime contamination but require provisioning or migration after a switch.
  • Input hardening, checksums, locks, and shape checks improve safety and consistency; they do not prove mirror authenticity or erase platform limits.
Keywords
nvm-sh/nvmNode.jsShellPATH.nvmrcLTSnpmCachingAliasesTrust

Chapters

Preview every chapter · Unlock full text, audio, and video from chapter 4

Plans
Ch.1-3 FreeCh.4-8 Premium

FAQ

What problem does nvm-sh/nvm solve?

nvm-sh/nvm lets a user or project choose among Node.js versions in a user-owned shell or child process without replacing a system installation.

Does an .nvmrc file lock Node.js to one version?

No. An .nvmrc file records a selector, not a lock; exact versions reduce movement, while LTS labels and partial versions can change with metadata or available candidates.

Why can a Node.js version be installed but not active?

Because installation and activation are separate states. The version tree may exist while the current shell has not selected it, has stale lookup state, or has an incompatible npm prefix.

When is nvm-sh/nvm the right choice?

nvm-sh/nvm fits when a user or project needs multiple Node.js versions with local, reversible selection in a supported shell. It is not a system-wide policy service for every account or daemon.