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.
deno
/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.
.github/workflows/ci.yml
- 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.
Terminal
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.
Related guides
Deno version mismatch between deno.json and CI in CIFix Deno version mismatches in CI - the deno-version installed by setup-deno differs from what your code or d…
Deno DENO_DIR cache not restored (slow re-download) in CIFix slow Deno CI runs caused by DENO_DIR not being cached - every job re-downloads and re-checks all remote a…
Deno "error: No test modules found" in CIFix Deno "error: No test modules found" in CI - deno test matched no files, so the step exits nonzero without…