Skip to content

Latest commit

 

History

History
53 lines (39 loc) · 1.43 KB

File metadata and controls

53 lines (39 loc) · 1.43 KB

Node.js and pnpm

Node is managed per-project with fnm. pnpm is the package manager, delivered through Corepack.

Versions

Tool Version Managed by
fnm 1.39.0 manual install to ~/.local/share/fnm
Node.js 24.20.0 (LTS) fnm (default)
npm 11.19.0 bundled with Node
Corepack 0.35.0 bundled with Node
pnpm 11.25.0 Corepack

PNPM_HOME=~/.local/share/pnpm, and $PNPM_HOME/bin is first on PATH (set in ~/.config/zsh/integrations.zsh).

fnm

Installed as a standalone binary at ~/.local/share/fnm/fnm. Shell integration:

path=("$HOME/.local/share/fnm" $path)
eval "$(fnm env --use-on-cd --shell zsh)"

--use-on-cd switches Node automatically on cd into a directory containing a .node-version or .nvmrc file.

fnm install 24                 # Node 24 LTS
fnm default 24
fnm list
node --version                 # v24.20.0

pnpm via Corepack

corepack enable
corepack prepare pnpm@11.25.0 --activate
pnpm --version                 # 11.25.0

Prefer pinning the pnpm version per project with the packageManager field in package.json so Corepack resolves the right one.

Conventions

  • Use project-local dependencies and pnpm exec / pnpm dlx, not global installs.
  • Commit a .node-version (or .nvmrc) so fnm selects the right Node on cd.
  • npm remains available but pnpm is the default for this machine's projects.