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.
× 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.
{
"$schema": "https://turbo.build/schema.json",
"tasks": {
"build": { "dependsOn": ["^build"], "outputs": ["dist/**"] },
"lint": {}
}
}Ensure packages define the script
- Confirm at least one package has a
scripts.<task>entry. - Run
turbo run <task> --dryto see which packages turbo would execute. - If you upgraded turbo, rename
pipelinetotasksin turbo.json.
How to prevent it
- Keep
turbo.jsontasks in sync with the scripts your packages expose. - Use
turbo run <task> --dryto validate the plan before CI. - After a major turbo upgrade, migrate
pipeline→tasks.