-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
output: "hybrid" fails to show 404 page. #9615
Comments
Hello @disrae. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with |
This seems like an important issue. However, we can't investigate without a simple project to debug and try fixes on. |
Okay I will do, however the repro will have to be deployed on vercel for it to cause the issue. |
@disrae could you try with |
Hmm, it works in the new project, let me try upgrading astro from 4.0.6 to 4.1 or to your version. Could there be some kind of build cache on Vercel that I need to clear? |
Yeah, I noticed from the URL - it isn't the same issue I ran into earlier. Your old project (linked in the issue description) responds with a 500. What do the logs say? |
one second... reproducing.... |
Okay, upon re-reproducing in the main project, the patch version for the vercel adapter incremented by 2, and the issue seems to be gone! |
Latest Vercel adapter package seems to have solved the issue. |
Is the result any different when using the vercel CLI? pnpm exec astro build
pnpm exec vercel deploy --prebuilt --prod |
Sorry bogged down, but trying to get to that. |
|
From the error message, I can tell that vercel's platform is looking at wrong place. No astro code has run before that error occurs. It might be because install/build/start commands are set to a wrong preset in the project config. Can you try again by deploying to a new project? |
Nothing wrong with your example itself. https://repro-9615.vercel.app |
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
When using hybrid rendering, if I push my .vercel/ directory to the repo the 404 page function does not work.
404 with:
✅ Static rendering
✅ Hybrid localhost with 404 as function or static
❌ Hybrid on Vercel with 404 as function or static returns 500 error
500 error:
What's the expected result?
Expected 404 serverless function to return the 404 page.
https://docs.astro.build/en/guides/server-side-rendering/#add-an-adapter
https://docs.astro.build/en/guides/server-side-rendering/#opting-out-of-pre-rendering-in-hybrid-mode
Link to Minimal Reproducible Example
https://goose-website-cbarwkiun-goose-insurance-1c431eed.vercel.app/en-us/should-go-to-404
Participation
The text was updated successfully, but these errors were encountered: