Skip to content
Latchkey

Turborepo "task not found in pipeline" - Fix turbo.json

Turborepo only runs tasks declared in turbo.json. Asking it to run a task with no entry there - or whose name does not match a package script - fails because turbo has nothing to schedule.

What this error means

turbo run <task> stops with "Could not find task <task> in pipeline" (or "task not found in pipeline"). It is deterministic: the task is simply absent from turbo.json or from the package’s scripts.

turbo output
  × Could not find task "lint" in pipeline
  ╰─▶ Add "lint" to the "tasks" object in turbo.json
      (or "pipeline" on turbo 1.x).

Common causes

Task missing from turbo.json

The tasks object (turbo 2.x) or pipeline object (turbo 1.x) has no key for the task you invoked, so turbo will not run it.

No matching package script

Even when declared in turbo.json, turbo runs the package’s scripts.<task>. If no package defines that script, there is nothing to execute.

turbo 1.x → 2.x rename

turbo 2.x renamed pipeline to tasks. A config still using pipeline on turbo 2 (or vice versa) leaves tasks unresolved.

How to fix it

Declare the task in turbo.json

Add the task key with its dependencies and outputs. Use tasks on turbo 2.x.

turbo.json
{
  "$schema": "https://turbo.build/schema.json",
  "tasks": {
    "build": { "dependsOn": ["^build"], "outputs": ["dist/**"] },
    "lint": {}
  }
}

Ensure packages define the script

  1. Confirm at least one package has a scripts.<task> entry.
  2. Run turbo run <task> --dry to see which packages turbo would execute.
  3. If you upgraded turbo, rename pipeline to tasks in turbo.json.

How to prevent it

  • Keep turbo.json tasks in sync with the scripts your packages expose.
  • Use turbo run <task> --dry to validate the plan before CI.
  • After a major turbo upgrade, migrate pipelinetasks.

Related guides

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