Skip to content

Node.js Basics

The small operational habits for keeping Node sane on a dev box — version management through nvm, and not fighting the system Node.

Keeping Node up to date

node -v

Use nvm rather than system packages — projects pin versions, and system Node is never the version you want:

nvm install node        # latest
nvm install 20          # specific line
nvm use 20              # switch per shell

Per-project pinning: put the version in .nvmrc in the repo root, then nvm use picks it up automatically when you cd in.

See also