Unknown key: 'globalDependencies" with turbo 2.6.3

text for searching
❯ pnpm turbo lint
turbo 2.6.3

turbo_json_parse_error

  × Failed to parse turbo.json.
  ╰─▶   × Found an unknown key `globalDependencies`.
         ╭─[turbo.json:5:3]
       4 │   // https://turbo.build/repo/docs/core-concepts/caching/file-inputs#specifying-additional-inputs
       5 │   "globalDependencies": [
         ·   ────────────────────
       6 │     "pnpm-lock.yaml",
         ╰────

idk why I’m receiving this error, since I think I’ve spelled it correctly? and the docs agree?

Docs: Configuring turbo.json | Turborepo

And my turbo.json:

my turbo.json
{
  // Additive to package.json and turbo.json
  //
  // https://turbo.build/repo/docs/core-concepts/caching/file-inputs#specifying-additional-inputs
  "globalDependencies": [
    "pnpm-lock.yaml",
    "patches",
    ".github/workflows/ci.yml",
    ".github/workflows/release.yml",
    ".github/workflows/push-dish.yml",
    ".github/workflows/deploy-preview.yml"
  ],
  "tasks": {
    /////////////////////////////////////////////////
    /////////////////////////////////////////////////
    //
    //         Local Dev
    //
    /////////////////////////////////////////////////
    /////////////////////////////////////////////////
    "dev": {
      "dependsOn": ["^dev"],
      "cache": false
    },
    "start": {
      "dependsOn": ["_syncPnpm", "^build"],
      "outputs": [],
      "cache": false,
      "persistent": true
    },

    /////////////////////////////////////////////////
    /////////////////////////////////////////////////
    //
    //         C.I. / C.D.
    //
    /////////////////////////////////////////////////
    /////////////////////////////////////////////////
    "build": {
      "outputs": ["dist/**", "declarations/**"],
      "dependsOn": ["_syncPnpm"]
    },
    "build:app": {
      "outputs": ["dist/**"],
      "dependsOn": ["_syncPnpm"]
    },
    "_syncPnpm": {
      "dependsOn": ["^build"],
      "cache": false
    },
    "test:node": {
      "outputs": [],
      "dependsOn": ["_syncPnpm", "^build"]
    },
    "test:ember": {
      "env": ["CI_BROWSER", "EMBER_TRY_CURRENT_SCENARIO", "EMBROIDER_TEST_SETUP_OPTIONS"],
      "dependsOn": ["_syncPnpm", "^build"]
    },

    /////////////////////////////////////////////////
    /////////////////////////////////////////////////
    //
    //         Quality Checks
    //
    /////////////////////////////////////////////////
    /////////////////////////////////////////////////
    "_:lint": {
      "outputs": [],
      "dependsOn": [
        "lint:js",
        "lint:hbs",
        "lint:prettier",
        "lint:types",
        "lint:package",
        "lint:published-types"
      ]
    },
    "lint:js": { "outputs": [], "dependsOn": ["^build"] },
    "lint:hbs": { "outputs": [] },
    "lint:prettier": { "outputs": [] },
    "lint:types": { "outputs": [], "dependsOn": ["_syncPnpm"] },
    "lint:package": { "outputs": [], "dependsOn": ["build"] },
    "lint:published-types": { "outputs": [], "dependsOn": ["build"] },

    "_:lint:fix": {
      "cache": false,
      "dependsOn": ["lint:js:fix", "lint:prettier:fix", "lint:hbs:fix"]
    },
    // Prettier can alter files too, so let's prevent race conditions for multiple
    // writing to the same files.
    "lint:js:fix": { "cache": false },
    "lint:hbs:fix": { "cache": false },
    "lint:prettier:fix": { "cache": false, "dependsOn": ["lint:js:fix", "lint:hbs:fix"] }
  }
}


I potentially thought this might be a jsonc → json mistake, but removing the leading comments doesn’t change the error:

❯ pnpm turbo lint
turbo 2.6.3

turbo_json_parse_error

× Failed to parse turbo.json.
╰─▶   × Found an unknown key globalDependencies.
╭─[turbo.json:2:3]
1 │ {
2 │   “globalDependencies”: [
·   ────────────────────
3 │     “pnpm-lock.yaml”,
╰────

After upgrading to 2.70

❯ pnpm turbo lint
turbo 2.7.0

turbo_json_parse_error

× Failed to parse turbo.json.
╰─▶   × Found an unknown key globalDependencies.
╭─[turbo.json:2:3]
1 │ {
2 │   “globalDependencies”: [
·   ────────────────────
3 │     “pnpm-lock.yaml”,
╰────

Ok, so I don’t actually have a lint task in here – so it seems turbo is mis-reporting errors.

if I say pnpm turbo _:lint, I then get a different error

Once I back out all my changes to the original turbo.json I had here
{
  "$schema": "https://turbo.build/schema.json",
  // Required, because the root is a workspace
  "extends": ["//"],
  // Additive to package.json and turbo.json
  //
  // https://turbo.build/repo/docs/core-concepts/caching/file-inputs#specifying-additional-inputs
  "globalDependencies": [
    "pnpm-lock.yaml",
    "patches",
    ".github/workflows/ci.yml",
    ".github/workflows/release.yml",
    ".github/workflows/push-dish.yml",
    ".github/workflows/deploy-preview.yml"
  ],
  "tasks": {
    /////////////////////////////////////////////////
    /////////////////////////////////////////////////
    //
    //         Local Dev
    //
    /////////////////////////////////////////////////
    /////////////////////////////////////////////////
    "dev": {
      "dependsOn": ["^dev"],
      "cache": false
    },
    "start": {
      "dependsOn": ["_syncPnpm", "^build"],
      "outputs": [],
      "cache": false,
      "persistent": true
    },

    /////////////////////////////////////////////////
    /////////////////////////////////////////////////
    //
    //         C.I. / C.D.
    //
    /////////////////////////////////////////////////
    /////////////////////////////////////////////////
    "build": {
      "outputs": ["dist/**", "declarations/**"],
      "dependsOn": ["_syncPnpm"]
    },
    "build:app": {
      "outputs": ["dist/**"],
      "dependsOn": ["_syncPnpm"]
    },
    "_syncPnpm": {
      "dependsOn": ["^build"],
      "cache": false
    },
    "test:node": {
      "outputs": [],
      "dependsOn": ["_syncPnpm", "^build"]
    },
    "test:ember": {
      "env": ["CI_BROWSER", "EMBER_TRY_CURRENT_SCENARIO", "EMBROIDER_TEST_SETUP_OPTIONS"],
      "dependsOn": ["_syncPnpm", "^build"]
    },

    /////////////////////////////////////////////////
    /////////////////////////////////////////////////
    //
    //         Quality Checks
    //
    /////////////////////////////////////////////////
    /////////////////////////////////////////////////
    "_:lint": {
      "outputs": [],
      "dependsOn": [
        "lint:js",
        "lint:hbs",
        "lint:prettier",
        "lint:types",
        "lint:package",
        "lint:published-types"
      ]
    },
    "lint:js": { "outputs": [], "dependsOn": ["^build"] },
    "lint:hbs": { "outputs": [] },
    "lint:prettier": { "outputs": [] },
    "lint:types": { "outputs": [], "dependsOn": ["_syncPnpm"] },
    "lint:package": { "outputs": [], "dependsOn": ["build"] },
    "lint:published-types": { "outputs": [], "dependsOn": ["build"] },

    "_:lint:fix": {
      "cache": false,
      "dependsOn": ["lint:js:fix", "lint:prettier:fix", "lint:hbs:fix"]
    },
    // Prettier can alter files too, so let's prevent race conditions for multiple
    // writing to the same files.
    "lint:js:fix": { "cache": false },
    "lint:hbs:fix": { "cache": false },
    "lint:prettier:fix": { "cache": false, "dependsOn": ["lint:js:fix", "lint:hbs:fix"] }
  }
}

Does turbo no longer support the top-level package also being part of the package graph? (if so, then one of these releases should have been breaking instead of minor :see_no_evil_monkey: )

Why is this invalid tho?

❯ pnpm turbo _:lint
turbo 2.7.0

turbo_json_parse_error

× Failed to parse turbo.json.
╰─▶   × Found an unknown key extends.
╭─[turbo.json:4:3]
3 │   // Required, because the root is a workspace
4 │   “extends”: [“//”],
·   ─────────
5 │   // Additive to package.json and turbo.json
╰────

Docs: Configuring turbo.json | Turborepo
Tho, I do see it now says:

not in the root turbo.json.

But removing extends brings me back to:


× Failed to parse turbo.json.
╰─▶   × Found an unknown key globalDependencies.
╭─[turbo.json:7:3]
6 │   // 
7 │   “globalDependencies”: [
·   ────────────────────
8 │     “pnpm-lock.yaml”,
╰────

yea, confirm, rolling back to turbo 2.5.4 solves all my problems.

In fact, 2.5.4, requires the extends key. Turbo errors if I try to remove it.

Invalid turbo.json configuration
-> No "extends" key found.

Hey, Null. I think you might be right, these look like bad error messages. Do you think the case you’ve landed on is the same as this GitHub Issue?: Schrödinger's extends: doesn't work with the `extends`, doesn't work without it · Issue #11258 · vercel/turborepo · GitHub

If so, would love if you could add your repro there. If not, then a different GitHub Issue with your repro would be great! (I just don’t want to lose track of your report; I open up GitHub Issues when I start the day. If you want to paste any repros you have here, I can do the bookkeeping of moving them into an Issue if you prefer.)