Persistent tasks never exit

Dev servers are persistent and uncached; start siblings with with.

From turborepo, configuration/tasks.md, persistent and with.

Waiting on a server to finish

web needs the API running. Start dev.

dependsOnBad
"web#dev": { "dependsOn": ["api#dev"] }
withGood
"web#dev": { "with": ["api#dev"] }
{
  "tasks": {
    "dev": {
      "dependsOn": ["^build"],   // one-shot work may come first
      "persistent": true,        // never exits: nothing may depend on it
      "cache": false             // a server has no output to replay
    },
    "web#dev": {
      "with": ["api#dev"],       // start alongside, not before
      "persistent": true,
      "cache": false
    }
  }
}

Why it matters, pros and cons

Why it matters

dependsOn waits for a task to exit, and a server never exits. with starts the two together.

Pros

  • Every server starts at once.
  • cache: false stops a hit replaying a fake “ready”.
  • Turbo rejects depending on persistent tasks.

Cons

  • with doesn't wait for the API to be ready.
  • Needs turbo run dev, not per-app scripts.
  • --parallel is deprecated; don't reach for it.