Turborepo "could not find turbo.json" in CI
Turborepo reads task definitions from turbo.json at the workspace root. When turbo runs from the wrong directory or the file is absent, it cannot find turbo.json and refuses to run any task.
What this error means
turbo fails with "could not find turbo.json" or "Could not find turbo.json. Follow directions at ... to create one".
Turborepo
x could not find turbo.json
Follow directions at https://turbo.build/repo/docs to create oneCommon causes
turbo runs from the wrong working directory
A CI step with a different working-directory runs turbo where no turbo.json exists above it.
turbo.json is missing or not committed
The config was never added, was gitignored, or lives outside the checked-out path.
How to fix it
Run turbo from the repo root
- Confirm
turbo.jsonexists at the workspace root and is committed. - Run turbo from that directory in CI (no divergent working-directory).
- Re-run so turbo can load the task config.
.github/workflows/ci.yml
- run: npx turbo run build
working-directory: .Add a minimal turbo.json
Create a root turbo.json that declares your tasks so turbo has definitions to run.
turbo.json
{
"$schema": "https://turbo.build/schema.json",
"tasks": { "build": { "outputs": ["dist/**"] } }
}How to prevent it
- Keep
turbo.jsonat the repo root and committed. - Run turbo from the root in CI, not a subdirectory.
- Do not gitignore
turbo.json.
Related guides
Turborepo "failed to read package.json" in CIFix Turborepo "failed to read package.json" in CI - turbo could not parse a package manifest, usually invalid…
Turborepo "error preparing engine: Invalid task configuration" in CIFix Turborepo "error preparing engine: Invalid task configuration" in CI - a task in turbo.json references a…
Turborepo "pipeline" field removed in turbo 2.0 in CIFix Turborepo 2.0 failing because turbo.json still uses "pipeline" - version 2 renamed the field to "tasks",…