Summary
bun run dev:dashboard can fail on a fresh checkout because the dashboard imports @databuddy/devtools/react, but the dev task only builds @databuddy/sdk before starting the apps.
@databuddy/devtools exports ./react from ./dist/react/index.mjs, so when packages/devtools/dist has not been built yet, Next/Turbopack cannot resolve the dashboard layout import.
Reproduction
- Start from a checkout where
packages/devtools/dist is absent. I reproduced this locally by moving that directory out of the way.
- Run
bun run dev:dashboard.
- Request
http://localhost:3000/login so apps/dashboard/app/layout.tsx compiles.
Actual behavior
The route returns 500 and Next reports:
Module not found: Can't resolve '@databuddy/devtools/react'
./apps/dashboard/app/layout.tsx:6:1
Expected behavior
bun run dev:dashboard should prepare all dist-only workspace packages required by the dashboard, then /login should compile without a manual devtools build step.
Local verification
After the failure above, I ran:
bun run build --filter @databuddy/devtools
That recreated packages/devtools/dist, and the same /login request returned 200 OK on the same dev server.
Likely fix
turbo.json currently has:
"dev": {
"dependsOn": ["@databuddy/sdk#build"],
"cache": false,
"persistent": true
}
A small fix would add the devtools build prerequisite for the dashboard dev path as well, either globally on dev or as a dashboard-specific task if that is preferred.
Happy to open a focused PR against staging if this direction looks right.
Disclosure
I used AI assistance to inspect the repo and format this report. I manually reproduced the failure, verified the 500 response, ran the devtools build, and verified the route recovered with 200 OK.
Summary
bun run dev:dashboardcan fail on a fresh checkout because the dashboard imports@databuddy/devtools/react, but the dev task only builds@databuddy/sdkbefore starting the apps.@databuddy/devtoolsexports./reactfrom./dist/react/index.mjs, so whenpackages/devtools/disthas not been built yet, Next/Turbopack cannot resolve the dashboard layout import.Reproduction
packages/devtools/distis absent. I reproduced this locally by moving that directory out of the way.bun run dev:dashboard.http://localhost:3000/loginsoapps/dashboard/app/layout.tsxcompiles.Actual behavior
The route returns
500and Next reports:Expected behavior
bun run dev:dashboardshould prepare all dist-only workspace packages required by the dashboard, then/loginshould compile without a manual devtools build step.Local verification
After the failure above, I ran:
That recreated
packages/devtools/dist, and the same/loginrequest returned200 OKon the same dev server.Likely fix
turbo.jsoncurrently has:A small fix would add the devtools build prerequisite for the dashboard dev path as well, either globally on
devor as a dashboard-specific task if that is preferred.Happy to open a focused PR against
stagingif this direction looks right.Disclosure
I used AI assistance to inspect the repo and format this report. I manually reproduced the failure, verified the
500response, ran the devtools build, and verified the route recovered with200 OK.