denoland/deno · error · AnyError

Could not find a "{}" artifact for PR #{pr_number}. Availabl

Error message

Could not find a "{}" artifact for PR #{pr_number}.
Available artifacts may have expired or CI may not have completed.
Only release builds on linux-x86_64 and debug builds are typically available for PRs.

What it means

Deno found CI runs for the PR but none of them contained an artifact named like `release-<os>-<arch>-deno` (or the debug variant) to download. Artifact names encode platform and build type, and PR CI only publishes a limited set, so on most platforms the wanted artifact simply is never produced. Artifacts also expire after a retention period.

Source

Thrown at cli/tools/upgrade.rs:760

        .context("failed to run `gh run download`")?;

      if dl_result.status.success() {
        log::info!(
          "Downloaded artifact \"{}\" from run {}",
          colors::green(name),
          run_id
        );
        downloaded = true;
        break;
      }
    }
    if downloaded {
      break;
    }
  }

  if !downloaded {
    bail!(
      "Could not find a \"{}\" artifact for PR #{pr_number}.\n\
       Available artifacts may have expired or CI may not have completed.\n\
       Only release builds on linux-x86_64 and debug builds are typically available for PRs.",
      artifact_name
    );
  }

  // Find the downloaded binary
  let exe_name = if cfg!(windows) { "deno.exe" } else { "deno" };
  let new_exe_path = download_dir.join(exe_name);

  if !new_exe_path.exists() {
    bail!(
      "Downloaded artifact does not contain '{}'. Contents: {:?}",
      exe_name,
      fs::read_dir(download_dir)?
        .filter_map(|e| e.ok())
        .map(|e| e.file_name().to_string_lossy().to_string())

View on GitHub (pinned to 9ad36f7a2c)

Solutions

  1. On macOS/Windows/aarch64, install the debug artifact instead: pass the flag selecting the debug build (e.g. `--pr <n>` with the debug/`--cached` debug option your Deno version exposes) or check the run's artifact list.
  2. Wait until CI completes fully (artifact upload is a late step), then retry.
  3. If artifacts expired, build the PR branch from source or ask for a re-run to regenerate them.
  4. Verify what exists: `gh run view <run-id> --repo denoland/deno` and inspect the artifacts section.

Example fix

# before: requesting a release artifact that PRs never publish for your OS
deno upgrade --pr 12345

# after: use the debug artifact path on non-linux-x86_64
deno upgrade --pr 12345 --debug  # or build from source: git checkout <pr-branch> && cargo build --bin deno
Defensive patterns

Strategy: retry

Validate before calling

# confirm the artifact exists before upgrading
run_id=$(gh run list --repo denoland/deno --branch pr-branch --limit 1 -q '.[].databaseId')
gh api "repos/denoland/deno/actions/runs/$run_id/artifacts" --jq '.artifacts[].name' | grep -q "$(echo release-$(uname -s | tr A-Z a-z)-$(uname -m)-deno)" || echo "artifact absent — wait or use debug/build from source"

Try / catch

deno upgrade --pr 12345 2>err.log || { grep -q 'Could not find a' err.log && { sleep 300; deno upgrade --pr 12345; }; }

Prevention

When it happens

Trigger: `deno upgrade --pr <n>` on any platform other than linux-x86_64 for release artifacts (message explicitly says only linux-x86_64 release and debug builds are typically available); CI still in progress so artifacts are not uploaded yet; the run's artifacts expired (default GitHub retention).

Common situations: Trying to install a PR build on macOS or Windows; coming back to an old PR whose artifacts have expired; racing a CI run that has not reached the artifact upload step.

Related errors


AI-assisted analysis of denoland/deno@9ad36f7a2c (2026-08-20). Data as JSON: /api/errors/dcbc425155c053aa. Report an issue: GitHub.