Skip to content
Latchkey

Turborepo "Could not find the following tasks in project" in CI

Turborepo could not match the task name you ran to any task in turbo.json or any matching package.json script. The task is misspelled, not declared, or not present in the filtered packages.

What this error means

A turbo run X step fails with "error preparing engine: Could not find the following tasks in project: X" before any package runs.

Turbo
x error preparing engine: Could not find the following tasks in project: typecheck

Common causes

The task is not in turbo.json or any package.json

No tasks entry in turbo.json and no package script matches the name, so Turbo has nothing to schedule.

The filter excludes every package that defines it

The task exists, but the --filter narrows to packages that do not declare it, so Turbo finds none to run.

How to fix it

Declare the task and add a script

  1. Add the task to turbo.json under tasks.
  2. Ensure at least one package has a package.json script with that name.
  3. Re-run, or widen the --filter so a matching package is included.
turbo.json
{
  "tasks": {
    "typecheck": { "dependsOn": ["^build"] }
  }
}

Add the script to the package

Give the package a matching script so Turbo has something to invoke.

packages/ui/package.json
{
  "scripts": { "typecheck": "tsc --noEmit" }
}

How to prevent it

  • Declare every task you run in turbo.json.
  • Keep package scripts aligned with task names.
  • Check that your --filter still includes packages defining the task.

Frequently asked questions

What causes "Turbo "Could not find the following tasks in project""?
No tasks entry in turbo.json and no package script matches the name, so Turbo has nothing to schedule.
How do I fix Turbo "Could not find the following tasks in project"?
Declare the task and add a script

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card