Skip to content
Latchkey

Turborepo "no output files found" - Task Outputs Not Cached in CI

Turborepo stores a task’s declared outputs so later runs can replay them. When the outputs glob does not match the real artifact path, turbo caches nothing - every run is a "miss" and replays restore an empty result.

What this error means

turbo warns "no output files found for task" and the next run rebuilds (or restores nothing useful). The build clearly produced files, but turbo looked in the wrong place per the declared outputs.

turbo output
WARNING  no output files found for task web#build. Please check your
         "outputs" glob in turbo.json - it did not match dist/ or .next/

Common causes

Outputs glob does not match the artifact path

A task that writes to build/ while outputs says dist/** produces nothing for turbo to cache.

Outputs omitted entirely

A task with no outputs declared is treated as producing nothing cacheable, so replays are empty.

Framework default output dir changed

A framework upgrade that moves the output directory (e.g. .next location) silently breaks a previously-correct outputs glob.

How to fix it

Declare outputs matching the real path

List every directory/file the task emits so turbo captures and replays them.

turbo.json
{
  "tasks": {
    "build": { "outputs": ["dist/**", ".next/**", "!.next/cache/**"] }
  }
}

Verify outputs were captured

Inspect the dry run/summary to confirm the task has non-empty outputs.

Terminal
turbo run build --dry=json | jq '.tasks[] | {task, outputs}'

How to prevent it

  • Keep outputs globs aligned with each task’s real output directory.
  • Exclude caches (e.g. !.next/cache/**) but include the build output.
  • Re-check outputs after framework upgrades that move artifacts.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →