Is there an existing issue for this?
Current behavior
When running pnpm dev, the dev tasks for all packages use tsdown --watch, which cleans the dist/ directory on startup. Since turbo's dev task depends on ^build to pre-populate dist/, the clean step wipes those outputs before the apps (admin, space, live) can resolve them.
This causes errors like:
Failed to resolve entry for package "@plane/utils". The package may have incorrect main/module/exports specified in its package.json.
and:
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '.../node_modules/@plane/logger/dist/index.mjs'
The turbo pipeline runs ^build before dev, populating dist/. But tsdown --watch (the dev script) cleans dist/ as its first action, creating a window where apps try to import from empty dist/ directories.
Suggested fix
Add --no-clean to all tsdown --watch dev scripts in packages/*/package.json and apps/live/package.json:
- "dev": "tsdown --watch",
+ "dev": "tsdown --watch --no-clean",
The build script still cleans (tsdown default), so production builds remain unaffected. Only the watch mode skips cleaning, relying on ^build outputs already being in place.
### Steps to reproduce
1. `pnpm clean` (or `git pull` that invalidates turbo cache)
2. `pnpm dev`
3. admin, space, and live apps fail to start
Affected packages
All 12 packages + apps/live (13 files total).
Environment
- Node: v22.22.1
- tsdown: v0.16.0
- turbo: v2.8.12
- macOS
### Environment
Production
### Browser
Mozilla Firefox
### Variant
Local
### Version
v1.2.0
Is there an existing issue for this?
Current behavior
When running
pnpm dev, thedevtasks for all packages usetsdown --watch, which cleans thedist/directory on startup. Since turbo'sdevtask depends on^buildto pre-populatedist/, the clean step wipes those outputs before the apps (admin, space, live) can resolve them.This causes errors like:
Failed to resolve entry for package "@plane/utils". The package may have incorrect main/module/exports specified in its package.json.
and:
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '.../node_modules/@plane/logger/dist/index.mjs'
The turbo pipeline runs
^buildbeforedev, populatingdist/. Buttsdown --watch(thedevscript) cleansdist/as its first action, creating a window where apps try to import from emptydist/directories.Suggested fix
Add
--no-cleanto alltsdown --watchdev scripts inpackages/*/package.jsonandapps/live/package.json: