Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

dev: dashboard fails on fresh checkout when devtools dist is missing

Đang mở Phù hợp với người mới
#643 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
84/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
bun, next.js, typescript

Hướng nghiên cứu

Bắt đầu trong turbo.json, nơi tác vụ dev hiện đang phụ thuộc vào quá trình build SDK, và kiểm tra lệnh dev của dashboard cùng package @databuddy/devtools. Tái hiện bằng bun run dev:dashboard từ một checkout không có packages/devtools/dist, sau đó xác minh rằng điều kiện tiên quyết được build và /login trả về 200 mà không cần bước build thủ công.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

  1. Start from a checkout where packages/devtools/dist is absent. I reproduced this locally by moving that directory out of the way.
  2. Run bun run dev:dashboard.
  3. 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.

Ngôn ngữ chính
TypeScript
Star
1.2k
Fork
227
Merge trung bình
21 giờ 11 phút
Pull request đã merge (30 ngày)
238

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của databuddy-analytics/Databuddy

Tất cả issue của databuddy-analytics/Databuddy

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.