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 3Common 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
- Run the config through a JSON validator to find the syntax error.
- Confirm the keys match your installed Turbo major version (
tasksfor v2,pipelinefor v1). - 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 migrateHow to prevent it
- Validate
turbo.jsonJSON in a pre-commit hook. - Run
@turbo/codemodwhen upgrading Turbo majors. - Pin the Turbo version so the schema and config stay aligned.
Related guides
Turborepo "Could not find the following tasks in project" in CIFix Turborepo "Could not find the following tasks in project" in CI - the task you ran is not defined in turb…
Turborepo "root task ... must not depend on" in CIFix Turborepo "root task //#build (turbo run build) looks like it invokes turbo and might cause a loop" / roo…
Turborepo "error preparing engine: Could not find ... package" in CIFix Turborepo "error preparing engine: Could not find the package X in your workspace" in CI - the package na…