nodejs
Node.js and npm: the distribution package, or a pinned major from the upstream apt repository.
Installs Node.js and npm.
devtools:
- name: nodejsVersion behaviour
version | Result |
|---|---|
| omitted | the distribution’s nodejs and npm packages |
24, 24.5.0, v24 | the 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: codexNotes
claude-code,codex,playwright, and (on Alpine)vscode-weball need npm, and each will install the distribution Node.js if none is present. Declaringnodejsfirst — before those entries — is what pins the version they build against.- A versionless
nodejsworks 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
npmresolves on PATH.