nodejs

Node.js and npm, installed from the upstream apt repository on Debian and Ubuntu.

Installs Node.js and npm.

devtools:
  - name: nodejs

With no version, you get the current Active LTS release (Node 24) on Debian and Ubuntu, and the distribution’s own Node on Alpine. That is all most people need. Declare nodejs before claude-code, codex or playwright so they build on it.

Choosing a major

On Debian and Ubuntu, Node always comes from the upstream Node.js repository; version chooses which major.

versionDebian / UbuntuAlpine
omittedthe upstream repository for the current Active LTS major (Node 24)the distribution’s nodejs and npm packages
24, 24.5.0, v24the upstream repository for that major (24)refused, with a message saying to drop the version
latest, ltsno major to pin, so the Active LTS major againthe distribution packages

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

Debian and Ubuntu’s own nodejs package is not used because it stays on the major it shipped with for the life of the release (Debian 13 has Node 20), and the npm-based tools you are likely to install, such as Claude Code, Codex and Playwright, expect a current one.

Example

A project whose test runner needs a newer built-in module pins Node 24 explicitly, so the choice is visible in the manifest:

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

Notes

  • claude-code, codex and playwright all need npm, and each will install Node.js itself 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: the upstream repository publishes no musl build, so on Alpine a pinned version is refused with a message.
  • The workstation is considered to have this devtool once npm resolves on PATH.