vercel / turborepo

Build system optimized for JavaScript and TypeScript, written in Rust
https://turbo.build/repo/docs
MIT License
26.17k stars 1.81k forks source link

Scaffolding tool needs update: “pipeline” field should be “tasks” in turbo.json #8301

Closed PixelHabits closed 4 months ago

PixelHabits commented 4 months ago

Verify canary release

Link to code that reproduces this issue

https://github.com/PixelHabits/turborepo-2.0-issue

What package manager are you using / does the bug impact?

pnpm

What operating system are you using?

Mac

Which canary version will you have in your reproduction?

2.0.0-canary.4

Describe the Bug

After scaffolding a new template application using pnpm dlx create-turbo@latest, running the turbo dev command results in the following error:

× found `pipeline` field instead of `tasks`
    ╭─[turbo.json:3:1]
  3 │       "globalDependencies": ["**/.env.*local"],
  4 │ ╭─▶   "pipeline": {
  5 │ │       "build": {
  6 │ │         "dependsOn": ["^build"],
  7 │ │         "outputs": [".next/**", "!.next/cache/**"]
  8 │ │       },
  9 │ │       "lint": {
 10 │ │         "dependsOn": ["^lint"]
 11 │ │       },
 12 │ │       "dev": {
 13 │ │         "cache": false,
 14 │ │         "persistent": true
 15 │ │       }
 16 │ ├─▶   }
    · ╰──── rename `pipeline` field to `tasks`
 17 │     }
    ╰────
  help: changed in 2.0: `pipeline` has been renamed to `tasks`

Expected Behavior

The turbo dev command should run without errors after scaffolding a new template application.

To Reproduce

Scaffold a new template application using:

pnpm dlx create-turbo@latest

Additional context

The issue can be fixed by changing the pipeline field in turbo.json to tasks as suggested by the command line output. The scaffolding tool should be updated to reflect this change.

PixelHabits commented 4 months ago

I also verified the issue is still present on v.2.0.1

anthonyshew commented 4 months ago

We're working on this here: https://github.com/vercel/turbo/pull/8284

Sorry for not having them ready to go right away! We had to wait for the npm publish to get the examples fixed up.

anthonyshew commented 4 months ago

Should be good now! Sorry again for the wait.

PixelHabits commented 4 months ago

Thanks so much working great