Skip to content
Latchkey

Turborepo "failed to read turbo.json" in CI

Turborepo reads turbo.json at the workspace root before anything else. A missing file, a JSON syntax error, or a key that the installed Turbo version no longer accepts makes this read fail and stops the run.

What this error means

A turbo run step fails immediately with "failed to read turbo.json" or a parse error pointing at a line and column in the config.

Turbo
x failed to read turbo.json: unexpected character '}' at line 8 column 3

Common causes

Invalid JSON in turbo.json

A trailing comma, missing brace, or stray character makes the file unparseable.

A schema from a different Turbo major version

Turbo 2 renamed pipeline to tasks; an old key under a new Turbo (or the reverse) is rejected as an unknown field.

How to fix it

Validate the JSON and the schema

  1. Run the config through a JSON validator to find the syntax error.
  2. Confirm the keys match your installed Turbo major version (tasks for v2, pipeline for v1).
  3. Re-run once the file parses.
Terminal
npx turbo --version
node -e "JSON.parse(require('fs').readFileSync('turbo.json','utf8'))"

Migrate the config to the current schema

Use the official codemod to update turbo.json to the schema your Turbo version expects.

Terminal
npx @turbo/codemod migrate

How to prevent it

  • Validate turbo.json JSON in a pre-commit hook.
  • Run @turbo/codemod when upgrading Turbo majors.
  • Pin the Turbo version so the schema and config stay aligned.

Related guides

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