Unnecessary package task syntax error

Why this error occurred

Turborepo supports adding additional turbo.json files in a package directory to override the turbo.json file declared at the repository root, a feature called Workspace Configurations. In those additional turbo.json files, you can only configure tasks for that specific package. Therefore, only the task name should be included in the task, not the package and task name (package#task).

turbo.json file in apps/web directory:

Turborepo logo
./turbo.json
{
  "tasks": {
    "web#build": {
      "dependsOn": ["lint"]
    }
  }
}

Since this turbo.json file is inside a package directory, the web prefix is unnecessary.

Solution

Remove the package prefix from the task name:

Turborepo logo
./turbo.json
{
  "tasks": {
    "build": {
      "dependsOn": ["lint"]
    }
  }
}