GitHub Actions "Process completed with exit code 127" - Command Not Found
Exit code 127 means the shell could not find the command it was asked to run. The tool is not installed, its setup step did not run, or its directory is not on PATH for this step.
What this error means
A run step fails with "command not found" and "Process completed with exit code 127". The command name in the error is the tool the shell could not locate.
Actions log
/home/runner/work/_temp/abc.sh: line 1: pnpm: command not found
Error: Process completed with exit code 127.Common causes
Tool not installed on the runner
The command’s setup action (e.g. pnpm/action-setup) was missing or skipped, so the binary is not present.
Binary not on PATH in this step
A tool installed to a local directory in one step is not on PATH in a later step unless its directory is added to GITHUB_PATH.
How to fix it
Install the tool before using it
Add the setup step that provides the command earlier in the job.
.github/workflows/ci.yml
- uses: pnpm/action-setup@v4
with:
version: 9
- run: pnpm install # pnpm now on PATHMake the binary discoverable
- Add a locally installed tool’s bin directory to the job PATH: echo "$PWD/bin" >> "$GITHUB_PATH".
- Confirm the setup step actually ran (it may have been skipped by an if:).
- Use the full path to the binary if it lives outside PATH.
How to prevent it
- Run the tool’s setup action before any step that uses it.
- Persist installed bin directories to GITHUB_PATH for later steps.
- Verify required tools with a quick which/--version step early.
Related guides
GitHub Actions "Process completed with exit code 1" - Locate the Real FailureUnderstand GitHub Actions "Process completed with exit code 1" - a generic non-zero exit from a run step. Fin…
GitHub Actions Docker Action Fails - Docker Hub Pull Rate Limit (429)Fix GitHub Actions Docker-action failures from the Docker Hub pull rate limit - anonymous pulls hit "toomanyr…
GitHub Actions "Argument list too long" from a Large Matrix or CommandFix GitHub Actions "Argument list too long" (E2BIG) - a step passing a huge expanded matrix value or file lis…