nodejs

Node.js and npm: the distribution package, or a pinned major from the upstream apt repository.

Installs Node.js and npm.

devtools:
  - name: nodejs

Version behaviour

versionResult
omittedthe distribution’s nodejs and npm packages
24, 24.5.0, v24the upstream apt repository for that major (24) is declared, its signing key installed, and the nodejs package installed from it

Only the leading integer is used, so 24, 24.5.0, and v24 all select the Node 24 repository. The upstream package bundles npm.

Pinning a major is the declarative equivalent of piping an upstream setup script into a shell: the repository and its key become part of the workstation’s package configuration, and Node installs through the normal package phase.

Example

Debian 13 ships Node 20. A project whose test runner needs a newer built-in module pins Node 24 and installs the npm-based CLIs on top of it:

devtools:
  - name: nodejs
    version: "24"
  - name: claude-code    # npm install -g, on the Node 24 above
  - name: codex

Notes

  • claude-code, codex, playwright, and (on Alpine) vscode-web all need npm, and each will install the distribution Node.js if none is present. Declaring nodejs first — before those entries — is what pins the version they build against.
  • A versionless nodejs works on Debian, Ubuntu, and Alpine. Pinning a major requires Debian or Ubuntu: it relies on an apt repository, so on Alpine it fails rather than quietly installing a different version.
  • The workstation is considered to have this devtool once npm resolves on PATH.