Evaluating turbo: how to run a dev command for "current" project and all its dependencies #7950
Replies: 3 comments 1 reply
You can do this with global As far as a "global watcher" goes, we're building a Watch Mode right now. |
|
Sorry if I wasn't clear. It's not prepending Ideally, I'd like to be able to run You are right of course, I can still add a custom script inside package.json to write once the full command. Regarding the watch mode, It's cool it's in progress. thanks for the help |
|
Hi @stevebeauge. Two separate questions here — both solvable with Turborepo's built-in features. 1. Shorthand for "current project + dependencies"Turborepo has Automatic Package Scoping when
This runs If you need the dependency tree explicitly, use the The 2. Concurrency pressureThe default concurrency is Or override at runtime: The 3. Hardware contextI run 4. Consider Bun as your package managerTurborepo has first-class Bun support (installation docs). If install times are part of the friction, Bun is worth evaluating:
Migration is straightforward: Bun workspaces use the same Key advantage: Bun's faster module resolution means each dev server starts quicker, reducing total time under heavy concurrent load. Tradeoff to note: pnpm's |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Summary
Hi,
I'm maintaining a large monorepo, currently orchestrated by nx. However, due to reliability issues, I'm evaluating the opportunity to migrate to turbo.
The repository contains different types of packages (25 packages):
Because of the internal architecture of the webapp compilation), running a "watch mode" for a web app requires watching the webapp itself but also every dependencies.
This leads to a few questions:
Shorthand for "current project" ?
As far as I understand, if I want to run a "serve" command for a project and all its dependencies, I need to execute
pnpm turbo run serve --filter "@myrepo/somewebapp...".Is there a simpler command to run this? Is there any shorthand to express
run this script in the current folder, and all its dependencies?I can probably add another package.json script like
"start-serve" : "turbo run serve --filter \"@myrepo/somewebapp...\""but it adds extra maintenance to every web apps.Concurrency pressure
If a webapp requires a large dependency stack, the concurrent tasks are eating all CPU and memory.

turbo detects automatically the depth of dependencies and suggest to add
--concurrency 12(actual depth of my repo).So running the serve command will create 12 concurrent serve operations for every package, which makes the system being unusable. My laptop is a core I7 + 16gb of ram, and the CPU + RAM are getting used at max.
How to prevent this ?
As a side note, the "nx" version of my repo rely on the nx "global watch" command. There's a single watch context, for the whole repo, and nx call a package.json script "build-incremental" on package owning the change. It's not as efficient as a real watch mode, like tsc --watch, but it allows me to keep the system working.
Thanks for any insights
Additional information
No response
Example
No response
All reactions