Skip to content
Latchkey

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 one

Common 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

  1. Confirm turbo.json exists at the workspace root and is committed.
  2. Run turbo from that directory in CI (no divergent working-directory).
  3. 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.json at the repo root and committed.
  • Run turbo from the root in CI, not a subdirectory.
  • Do not gitignore turbo.json.

Related guides

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