-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Prerendered data.json on Vercel results in 500 error #8331
Comments
I'm a bit confused -- if you're deploying to Vercel, why not use the Vercel adapter? |
Because, my whole site is prerenderable. The static adapter even has a special handling for Vercel with zero-config so I assume it's an intended use case. Anyway, it's exactly the same for adapter Vercel, you can check linked PR 😃 |
Oddly enough, this only happens during navigation and not when the page is directly loaded (from a direct link or reload) |
Yeah, because on direct navigation the data has been inlined during prerendering instead of fetched on demand |
Resolved by linked PR, which has been merged and released, thank you 🥳 |
Describe the bug
Hello!
Currently prerendering (e.g. adapter static) with auto config for Vercel results with an error 500 on client-side navigations to pages with
__data.json
.Few cents from things that I investigated (if I'm correct at least 😄). I checked and it correctly works in local build and preview mode. I think issue is with Vercel zero config mode for adapter static. Normally it outputs everything to build directory, for vercel it's creating a special directory.
Wrote pages to ".vercel/output/static/_app/prerendered"
, then it creates a config which maps the underlying files to specific URLs e.g.{"src":"/en","dest":"_app/prerendered/en.html"}
. Thedata.json
prerendered files are missing from the generated Vercel config. Hence, they're matched based on filesystem and can't be foundReproduction
Repo: https://github.com/pawelblaszczyk5/vercel-static-500
Deployed page: https://vercel-static-500.vercel.app/
Logs
System Info
Severity
serious, but I can work around it
Additional Information
I'll try to come up with PR with fix, however, I'm not really familiar with the codebase and adapters structure yet, so I'm not sure about my solution 😅
My stab at solving this: #8332
The text was updated successfully, but these errors were encountered: