Deno "deno: command not found" in CI (setup-deno)
The shell could not find a deno executable. GitHub-hosted runners do not include Deno by default, so a step needs to install it (usually denoland/setup-deno) before any deno command runs.
What this error means
A step calling deno ... fails with "deno: command not found" and exit code 127, before any Deno output appears.
/home/runner/work/_temp/script.sh: line 1: deno: command not found
Error: Process completed with exit code 127.Common causes
No setup-deno step in the job
The workflow never installs Deno, so the runner has no deno binary on PATH.
The deno command runs before setup
A deno step is ordered before the setup-deno step, so Deno is not yet installed when it runs.
How to fix it
Add setup-deno before deno steps
- Add the denoland/setup-deno action early in the job.
- Ensure every deno command runs after it.
- Pin a deno-version so the runtime is deterministic.
- uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- run: deno --versionConfirm Deno is on PATH
Log deno --version right after setup so a missing install fails visibly at the right place.
deno --versionHow to prevent it
- Install Deno with setup-deno before any deno step.
- Pin
deno-versionfor reproducible runs. - Add a
deno --versionstep to verify the install.