Skip to content
Latchkey

Turborepo "no output files found for task" (cache saves nothing) in CI

turbo caches the files a task declares in outputs. If a task has no outputs or the globs match nothing, turbo warns that no output files were found and stores an empty cache entry, so replaying it produces no artifacts and later steps rebuild.

What this error means

turbo prints "no output files found for task package#build" and the cache entry is empty, so downstream jobs cannot reuse the build output.

Turborepo
WARNING  no output files found for task web#build
Please check your `outputs` key in turbo.json

Common causes

The task declares no outputs

A task without an outputs key caches nothing, so cache hits restore no files even when the hash matches.

The outputs glob matches nothing

An outputs glob pointing at the wrong directory (or a path the build does not write) captures zero files.

How to fix it

Declare the real output paths

  1. Find where the task actually writes files (dist, .next, build).
  2. Set outputs to match those paths.
  3. Re-run so the cache captures the artifacts.
turbo.json
{
  "tasks": {
    "build": { "outputs": ["dist/**", ".next/**", "!.next/cache/**"] }
  }
}

Verify what the cache captured

Use a dry run to see the outputs turbo will save for each task and confirm the globs match.

Terminal
npx turbo run build --dry=json

How to prevent it

  • Declare outputs on every cacheable task.
  • Match output globs to the build tool's real output directory.
  • Use --dry to confirm outputs before relying on the cache in CI.

Frequently asked questions

What causes ""no output files found for task""?
A task without an outputs key caches nothing, so cache hits restore no files even when the hash matches.
How do I fix "no output files found for task"?
Declare the real output paths

Related guides

References

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