Newman "newman: command not found" in CI
The shell could not find a newman executable on PATH. On a clean runner Newman is not preinstalled, so it must be installed (usually via npm) before the collection-run step, or invoked through npx.
What this error means
A step running newman run ... fails immediately with "newman: command not found" and exit code 127, before any collection is loaded.
/home/runner/work/_temp/script.sh: line 1: newman: command not found
Error: Process completed with exit code 127.Common causes
Newman was never installed on the runner
GitHub-hosted runners do not ship Newman. Without an install step the newman binary does not exist on PATH.
A global npm install that did not land on PATH
A npm install -g newman in one step may not persist its bin directory to PATH for a later step, so the command is still not found.
How to fix it
Install Newman before running the collection
- Add a step that installs Newman globally with npm.
- Run
newman --versionto confirm it is on PATH. - Then run your collection.
- run: npm install -g newman
- run: newman run collection.jsonInvoke via npx to skip a global install
npx resolves and runs Newman without a persistent global install, avoiding PATH issues between steps.
npx -y newman run collection.jsonHow to prevent it
- Pin Newman as a devDependency and call it via npx or a package script.
- Verify with
newman --versionright after installing. - Prefer running through npm scripts so the local bin is on PATH.