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.
WARNING no output files found for task web#build
Please check your `outputs` key in turbo.jsonCommon 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
- Find where the task actually writes files (dist, .next, build).
- Set
outputsto match those paths. - Re-run so the cache captures the artifacts.
{
"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.
npx turbo run build --dry=jsonHow to prevent it
- Declare
outputson every cacheable task. - Match output globs to the build tool's real output directory.
- Use
--dryto confirm outputs before relying on the cache in CI.