TanStack / TanStack/cli

Error in production but not caught by linter via pnpm build

Đang mở
#167 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

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

Ngôn ngữ chính
TypeScript
Star
1.3k
Fork
185
Merge trung bình
18 giờ 45 phút
Pull request đã merge (30 ngày)
2

Mô tả

Which project does this relate to?

Create Tanstack App

Describe the bug

I discovered a bug because I was trying to figure out why my code was building and deplying without errors then upon visiting the deployed website getting the response back from the url in return.

{
  "error": true,
  "url": "https://tanstack-start-deployment-bug.vercel.app/",
  "statusCode": 500,
  "statusMessage": "Server Error",
  "message": "Server Error"
}

I made a repo to demonstrate the issue

https://github.com/remusris/tanstack-start-deployment-bug

below is the deployment url

https://tanstack-start-deployment-bug.vercel.app/

Basically if you export a const from the a route into some component this will trigger the error in deployment.

If you look at the ComponentWithImportedZod.tsx file that is culprit of the issue

https://github.com/remusris/tanstack-start-deployment-bug/blob/master/src/components/ComponentWithImportedZod.tsx

If this is non an error please let me know what I'm doing wrong.

Your Example Website or App

https://tanstack-start-deployment-bug.vercel.app/

Steps to Reproduce the Bug or Issue

Export a const from a file inside of routes into a component outside of routes. In this case it was a zod schema for validating searchParams

Expected behavior

The user does not get any build errors or deployment errors but once the URL is live all you get in response is

{
  "error": true,
  "url": "https://tanstack-start-deployment-bug.vercel.app/",
  "statusCode": 500,
  "statusMessage": "Server Error",
  "message": "Server Error"
}

https://tanstack-start-deployment-bug.vercel.app/

Screenshots or Videos

Check out the url below

https://tanstack-start-deployment-bug.vercel.app/

Platform

Google Chrome | 140.0.7339.128 (Official Build) (64-bit) (cohort: Stable)
Revision | 36aa3351631d175ee5346a1aaf74ef5d49abe308-refs/branch-heads/7339@{#1850}
OS | Windows 11 Version 24H2 (Build 26100.6584)

Additional context

No response

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

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.

Hướng nghiên cứu

Bắt đầu với src/components/ComponentWithImportedZod.tsx trong repository tái hiện được liên kết, sau đó chạy pnpm build và so sánh kết quả với phản hồi Vercel đã triển khai. Truy tìm lý do việc export một const từ một route vào một component bên ngoài lại tạo ra lỗi 500 khi triển khai; được xem là hoàn tất khi bản tái hiện không còn được triển khai với lỗi đó hoặc vấn đề được báo cáo trong quá trình build.

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

Đánh giá

Công nghệ
typescript
Lĩnh vực
build-system, cloud
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

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.