Turborepo "Could not find turbo.json" in CI
turbo walks up from the current directory looking for turbo.json and the workspace root. In CI it failed because the cwd was wrong or the config was not checked out.
What this error means
turbo exits immediately with "Could not find turbo.json or turbo.jsonc". It works locally from the repo root but fails in the job that runs from a subdirectory.
node
x Could not find turbo.json or turbo.jsonc in the current
| working directory or any parent directory.Common causes
Wrong working directory
The job ran turbo from a package folder above which there is no turbo.json, so the upward search failed.
turbo.json not committed
The config is untracked or gitignored, so the clean CI checkout has nothing to find.
How to fix it
Run turbo from the workspace root
Set the job working directory to the monorepo root where turbo.json lives.
workflow
# in the workflow step
# working-directory: . (repo root)
turbo run buildCommit turbo.json
Track the config so CI checks it out.
- Confirm turbo.json is not listed as untracked in git status.
- Remove any .gitignore entry hiding it.
- Commit and re-run.
How to prevent it
- Keep turbo.json at the monorepo root and tracked in git.
- Run turbo from the repo root in CI.
- Verify a clean checkout contains turbo.json before merging.
Related guides
Turborepo "command finished with error" in CIFix Turborepo "command (...) exited (1)" / "command finished with error" in CI - one task in the pipeline fai…
Nx "Cannot find project" in CIFix Nx "Cannot find project 'X'" in CI - the project name passed to nx run is not in the project graph, or th…
Vitest "Workspace config file not found" in CIFix Vitest "Workspace config file ... was not found" in CI - the --workspace path or vitest.workspace file is…