Skip to content
Latchkey

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 PATH

Make the binary discoverable

  1. Add a locally installed tool’s bin directory to the job PATH: echo "$PWD/bin" >> "$GITHUB_PATH".
  2. Confirm the setup step actually ran (it may have been skipped by an if:).
  3. 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

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →