Matched signals
- node: command not found
- npm: command not found
- npx: command not found
- /usr/bin/env: 'node': No such file or directory
- env: node: No such file or directory
- sh: node: not found
- sh: npm: not found
- sh: npx: not found
Node.js runtime or tool missing in CI
What this failure means
The CI job tried to run a Node.js binary (node, npm, or npx) but the runtime was not installed or was not on $PATH in the runner or container image.
Symptoms
Faultline looks for one or more of these log fragments:
node: command not found
npm: command not found
npx: command not found
/usr/bin/env: 'node': No such file or directory
env: node: No such file or directory
sh: node: not found
sh: npm: not found
sh: npx: not found
Diagnosis
The failing step relied on the Node.js runtime being present in the environment, but the runner could not find node, npm, or npx in $PATH.
Common causes:
- the container or runner image is not a Node.js image and does not include Node.js
- a setup step (e.g.
actions/setup-node) was skipped or ran after the failing step - the Node.js version manager (nvm, fnm, volta) changed the PATH but the shell did not inherit it
- the job runs in a separate Docker container where the host-installed Node.js is not available
Fix steps
-
In GitHub Actions, use
actions/setup-nodebefore any node-dependent step:- uses: actions/setup-node@v4 with: node-version: '20' -
In a Docker-based CI job, use a Node.js base image:
FROM node:20-slim -
If using nvm or fnm, make sure the activation is in the same shell session as the failing command:
export NVM_DIR="$HOME/.nvm" . "$NVM_DIR/nvm.sh" node --version -
Confirm Node.js is available before running dependent steps:
node --version npm --version
Validation
node --versionreturns the expected version inside the CI environment.npm --versionsucceeds in the same shell session.- Re-run the failing step and confirm it completes past the binary lookup phase.
Why it matters
Node.js is a foundational runtime for frontend build pipelines, test runners, and toolchain scripts. A missing Node.js installation stops the job immediately and blocks all downstream steps.
Prevention
- Pin Node.js setup to an explicit version in every workflow that depends on it.
- Add a
node --version && npm --versionsmoke check to catch environment drift early. - Use a versioned Node.js base image rather than relying on pre-installed host tooling.
Try it locally
node --version
npm --version
which node
node --version
npm --version
How Faultline detects it
Use faultline explain node-missing-executable to see the full playbook.
faultline analyze build.log
faultline explain node-missing-executable
Generated from playbooks/bundled/log/build/node-missing-executable.yaml. Do not edit directly.