Pick a depth. Each prompt opens in your AI pre-loaded with the lesson. Click a row to preview the prompt.
Node's release cadence is fast: even-numbered majors (18, 20, 22) are LTS for ~3 years, odd-numbered are not. You'll have multiple Node versions on one machine. nvm is the venerable choice (shell-only); volta is the rust-written newer option (faster, project-pinned auto-switching); corepack is Node-builtin and manages package managers (pnpm, yarn) without global installs. Pick one and stick with it.
Node version managers solve a real problem: different projects require different Node.js versions, and switching them manually invites version drift and subtle incompatibilities. nvm (Node Version Manager) is the original and most widely used — it manages versions per shell session via .nvmrc files — while volta pins versions per-project in package.json and automatically switches without any shell configuration. Knowing which tool your team uses and why version pinning matters is the difference between a reproducible development environment and a 'works on my machine' nightmare.
node --version, then install a different major version, and switch with nvm use or auto-switching..nvmrc (or volta block in package.json) pinning Node 22. cd in and verify the right version is active.corepack enable. Now pnpm and yarn are available without global installs.volta install pnpm to pin pnpm at the user level. Run pnpm --version from anywhere.# nvm (mac/linux):
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
$ nvm install 22 && nvm use 22
# volta (rust-based, auto-switches per project):
$ curl https://get.volta.sh | bash
$ volta install node@22
# pin Node per project:
$ echo "22" > .nvmrc # nvm reads this
$ # OR with volta — set in package.json:
$ cat package.json
{
"name": "myapp",
"volta": { "node": "22.4.0", "pnpm": "9.4.0" }
}
# corepack — manages pnpm/yarn:
$ corepack enable
$ corepack prepare pnpm@9.4.0 --activate
$ pnpm --versionnode main.js