Skip to content
Latchkey

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

  1. Add the denoland/setup-deno action early in the job.
  2. Ensure every deno command runs after it.
  3. 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 --version

Confirm Deno is on PATH

Log deno --version right after setup so a missing install fails visibly at the right place.

Terminal
deno --version

How to prevent it

  • Install Deno with setup-deno before any deno step.
  • Pin deno-version for reproducible runs.
  • Add a deno --version step to verify the install.

Frequently asked questions

What causes ""deno: command not found""?
The workflow never installs Deno, so the runner has no deno binary on PATH.
How do I fix "deno: command not found"?
Add setup-deno before deno steps

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card