Node¶
Commands¶
| Command | Description |
|---|---|
lerd node:install <version> | Install a Node.js version globally via fnm |
lerd node:uninstall <version> | Uninstall a Node.js version via fnm |
lerd node:use <version> | Set the global default Node.js version |
lerd isolate:node <version> | Pin Node version for cwd — writes .node-version, runs fnm install |
Usage¶
lerd install places shims for node, npm, and npx in ~/.local/share/lerd/bin/, which is added to your PATH. You use them exactly as you normally would — lerd picks the right version automatically:
Version resolution¶
.nvmrcin the project root.node-versionin the project rootpackage.json—engines.nodefield- Global default in
~/.config/lerd/config.yaml
To pin a project to a specific version:
To install a version without pinning a project:
Default version¶
lerd node:use <version> sets the global default and stores it in ~/.config/lerd/config.yaml. Sites without a pinned version use this default.
Version numbers are normalised to the major only — 22.11.0 and 22.14.1 are both treated as 22, so only one entry per major appears in the UI and CLI.
fnm¶
Node version management is handled by fnm, which is bundled and installed automatically. The node, npm, and npx shims in ~/.local/share/lerd/bin/ invoke the correct version via fnm for each project.