Error in production but not caught by linter via pnpm build
Ninguém assumiu esta issue ainda.
- Linguagem predominante
- TypeScript
- Estrelas
- 1.3k
- Forks
- 185
- Merge médio
- 18h 45min
- PRs com merge (30d)
- 2
Descrição
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
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
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Direção de pesquisa
Comece com src/components/ComponentWithImportedZod.tsx no repositório de reprodução vinculado, depois execute pnpm build e compare o resultado com a resposta implantada do Vercel. Rastreie por que exportar um const de uma rota para um componente externo produz um erro 500 no deploy; considera-se concluído quando a reprodução não for mais implantada com essa falha ou quando o problema for reportado durante o build.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- typescript
- Domínio
- build-system, cloud
- Tipo de issue
- Bug
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Status de atividade
- Pouca atividade
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 45/100