KIMS v2 needs Node.js 24. package.json says "node": ">=24.0.0 <25" and "npm": ">=10.0.0". The image (node:24-slim), the Jenkins agent and every test run on 24.
On your laptop Node is used for npm install, checking and (in the rehearsal) loading the data bundle, the migrations, the local apps and the site build.
Do not take "the latest LTS". Since October 2026 the newest LTS is Node 26, and that is what winget install OpenJS.NodeJS.LTS, brew install node and the nodejs.org front page now give you. On 26, npm install prints EBADENGINE warnings and the site build and image are untested. Install 24 explicitly, as below. Node 24 ("Krypton") is still supported: it was at 24.22.3 in November 2026.
#Install
Pick one way per system. A version manager is the most flexible if you also work on other Node projects; a plain install is simplest otherwise.
NodeSource packages (system-wide, simplest on a server or a fresh laptop):
# Ubuntu or Debian
curl -fsSL https://deb.nodesource.com/setup_24.x | sudo -E bash -
sudo apt install -y nodejs# RHEL, Rocky, Alma, Fedora, Amazon Linux 2023
curl -fsSL https://rpm.nodesource.com/setup_24.x | sudo bash -
sudo dnf install -y nodejsOr nvm (per user, no sudo):
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.41.0/install.sh | bashClose and reopen the terminal, then:
nvm install 24
nvm alias default 24Both work on amd64 (x86_64) and arm64 (aarch64). Read a script before piping it to a shell if your organisation requires it: download it with curl -fsSLo setup.sh <URL>, read it, then run it.
Homebrew (works on Apple silicon and Intel):
brew install node@24node@24 is "keg-only": Homebrew does not put it on your PATH, so add it:
echo 'export PATH="$(brew --prefix node@24)/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc(brew --prefix is /opt/homebrew on Apple silicon and /usr/local on Intel; the line works on both.) If you already have Homebrew's node (26) installed, this puts 24 in front of it.
Or nvm (per user):
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.41.0/install.sh | bashClose and reopen Terminal, then nvm install 24 and nvm alias default 24.
Or the official installer: download node-v24.22.3.pkg from https://nodejs.org/dist/v24.22.3/ and open it.
The official MSI for version 24 (simplest, system-wide; needs admin rights):
winget install -e --id OpenJS.NodeJS.LTS --version 24.22.3If winget says no such version, list what it has with winget show --id OpenJS.NodeJS.LTS --versions and pick the newest that starts with 24., or download node-v24.22.3-x64.msi from https://nodejs.org/dist/v24.22.3/ and run it. (On a Windows on Arm laptop, use node-v24.22.3-arm64.msi.)
To stop winget upgrading it to 26 later: winget pin add --id OpenJS.NodeJS.LTS.
Or nvm-windows (switch versions; per user once installed):
winget install -e --id CoreyButler.NVMforWindowsOpen a new PowerShell window, then:
nvm install 24
nvm use 24nvm use may ask for administrator rights (it changes a symlink under Program Files). Uninstall any other Node first: nvm-windows does not work alongside an MSI install.
Or fnm: winget install -e --id Schniz.fnm, then follow its instructions to add fnm env --use-on-cd | Out-String | Invoke-Expression to your PowerShell profile, and fnm install 24 and fnm default 24.
#Which one did the engineer use
The engineer's Windows laptop ran a newer Node than 24 for local work, with EBADENGINE warnings and no other problem in development. The image, the Jenkins agent and every site build that was checked ran on 24. Use 24 for anything that matters: the bundle load, the site build and anything you compare with Jenkins.
#Check
Open a new terminal window, then:
node --version
npm --versionYou should see v24.x.y (for example v24.22.3) and 11.x.y (Node 24 ships with npm 11; anything 10 or later is fine).
Check that the shell is using the Node you think it is:
command -v node; command -v npmcommand -v node; command -v npmwhere.exe node; where.exe npmThe first line of each should be the install you just made (for example /usr/bin/node, /opt/homebrew/opt/node@24/bin/node, ~/.nvm/versions/node/v24.22.3/bin/node, or C:\Program Files\nodejs\node.exe). If an older or newer Node is listed first, it wins: remove it or fix the PATH order.
Once the code is cloned (Get the code), this checks Node against the project's own rule, from the repo:
npm install --dry-run --ignore-scriptsNo EBADENGINE line means the versions are right.
#npm install and npm ci
| Command | When | What it does |
|---|---|---|
npm install |
Your laptop, first time and after pulling | Installs from package-lock.json, may update the lock file if package.json changed |
npm ci |
Jenkins and the image build; also fine on your laptop | Deletes node_modules and installs exactly the lock file; fails if they disagree |
The repository is an npm workspace (apps/*, packages/*): one npm install at the root installs everything. Expect a few minutes and about 1.1 GB in node_modules. You should see added NNNN packages at the end.
Never commit a changed package-lock.json on site. If npm install changed it, git checkout -- package-lock.json.
#Native modules
Some packages ship compiled binaries (.node files) for each OS and CPU, chosen by npm at install time:
| Package | What it is for |
|---|---|
@next/swc-<os>-<cpu> |
The Next.js compiler (CMS, website, every build) |
@rollup/rollup-<os>-<cpu> |
Bundling in the tests (Vitest) |
@unrs/resolver-binding-<os>-<cpu> |
Module resolution in lint |
sharp and @img/sharp-* |
Image resizing (the worker) |
Two things follow:
- Do not copy
node_modulesbetween machines (for example from a Mac to a Windows laptop, or from the laptop into a container). Runnpm installon each machine. The image build installs its own for Linux, for the target CPU. - Windows Application Control can block them. The symptom is
An Application Control policy has blocked this filewhen Next.js starts, or in tests. See Windows notes for the check and what to ask IT.
#Behind a proxy
If KIMS's network needs a proxy for outbound HTTPS:
npm config set proxy http://<PROXY_HOST>:<PROXY_PORT>
npm config set https-proxy http://<PROXY_HOST>:<PROXY_PORT>If the proxy re-signs TLS with its own certificate authority, get its CA certificate from KIMS and point npm and Node at it (never switch TLS checking off):
npm config set cafile <PATH_TO_KIMS_CA_PEM>and set the environment variable NODE_EXTRA_CA_CERTS=<PATH_TO_KIMS_CA_PEM> for Node scripts (Which shell to use).
#If it goes wrong
| What you see | Cause | Fix |
|---|---|---|
npm warn EBADENGINE Unsupported engine { package: 'kims-v2', required: { node: '>=24.0.0 <25' ... current: { node: 'v26... |
Node 26 (or 22) is running | Install 24 as above; check where.exe node / command -v node |
node --version still shows the old version after installing |
An older Node earlier on PATH, or the window was open before installing |
Open a new window; remove the other Node or reorder PATH |
npm.ps1 cannot be loaded because running scripts is disabled on this system (Windows) |
PowerShell's execution policy blocks npm's .ps1 shim |
Type npm.cmd instead of npm, or Set-ExecutionPolicy -Scope CurrentUser RemoteSigned if IT allows |
nvm: command not found after installing nvm |
The shell profile was not reloaded | Open a new terminal, or source ~/.bashrc / source ~/.zshrc |
nvm use fails with exit status 1 and garbled text (Windows) |
nvm-windows needs administrator rights for the symlink | Run PowerShell as administrator once for nvm use 24 |
npm ERR! code ECONNRESET / ETIMEDOUT / UNABLE_TO_GET_ISSUER_CERT_LOCALLY |
No route to the npm registry, or a TLS-inspecting proxy | Behind a proxy |
Error: Cannot find module '@rollup/rollup-darwin-arm64' (or another platform) |
node_modules came from another machine, or an install was interrupted |
Delete node_modules and run npm install again |
Something went wrong installing the "sharp" module |
Same, or an unsupported CPU | Same; sharp supports amd64 and arm64 on all three systems |
An Application Control policy has blocked this file |
Windows blocks a native module | Windows notes |
JavaScript heap out of memory in a build |
Node's default heap is too small for a full site build | The Jenkins job sets NODE_OPTIONS=--max-old-space-size=4096; do the same locally |
#Sources
kims-v2/package.json(engines,workspaces)kims-v2/deploy/Dockerfile(node:24-slim),kims-v2/deploy/jenkins/README.md(agent: Node.js 24),kims-v2/deploy/jenkins/Jenkinsfile.site(NODE_OPTIONS)kims-deploy-info/shared/prerequisites.md,kims-deploy-info/local/00-prerequisites.md(EBADENGINE, native modules on Windows)- https://nodejs.org/en/about/previous-releases (Node 26 and 24 LTS, 24.22.3)
- https://nodejs.org/dist/v24.22.3/
- https://github.com/nodesource/distributions
- https://github.com/nvm-sh/nvm (v0.41.0)
- https://github.com/coreybutler/nvm-windows
- https://github.com/Schniz/fnm
- https://formulae.brew.sh/formula/node@24
- https://learn.microsoft.com/en-us/windows/package-manager/winget/install
- https://docs.npmjs.com/cli/v11/commands/npm-ci
- https://docs.npmjs.com/cli/v11/using-npm/config#proxy