Deployment Issue: Vike SSR on Vercel — Hydration Chunks Timing Out #2753
Replies: 5 comments 1 reply
-
|
Seems more like a Vercel question than a Vike one. Feel free to elaborate if you believe it's somewhat related to Vike. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for the reply. I understand this may lean toward Vercel’s routing, but I believe it’s still Vike-related because: |
Beta Was this translation helpful? Give feedback.
-
|
Many thanks for your response. I will do what you have said and get back. I appreciate. |
Beta Was this translation helpful? Give feedback.
-
|
Hello, I've opened the dependency upgrade PR here: https://github.com/KabDIY/JobSeekZM/pull/2 |
Beta Was this translation helpful? Give feedback.
-
|
Closing this discussion as the deployment issue is now resolved. The key to fixing the Vercel chunk timeout/hydration error was ensuring Vercel correctly served the client-side assets alongside the serverless function. We achieved this by: Using a Vercel-specific fork/template that correctly configured the build. Explicitly setting the Vercel outputDirectory to dist/client (where Vike bundles client assets). This change caused the problematic chunk files to correctly bundle within the Vercel deployment output, resolving the hydration timeout error. The issue was primarily an output configuration mismatch on Vercel. I thank you most sincerely. Should I run into another roadblock, will come knocking again. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
ENVIRONMENT:
React 19
Node 20.19.5
Vike 0.4.240
Vite 7.1.7
Vike-React 0.6.6
Vite/plugin-react 5.0.3
TARGET: VERCEL (EDGE FUNCTIONS)
Summary: We’ve been deploying a Vike SSR app to Vercel, and while SSR routes and API endpoints work fine, client-side hydration chunks consistently fail with 504 timeouts. The logs show Vercel trying to serve /assets/client..js and /assets/entries/.js through the function runtime instead of static delivery.
WHAT WE'VE TRIED:
Generated a fallback manifest.json from Vike’s internal .vite/ structure
Patched .vercel/output/static/assets/ with all client chunks
Wired SSR entry (server/entry.js) to .vercel/output/functions/render.func/index.mjs
Configured vercel.json with rewrites and headers to preserve static routing
Reverted to earlier vercel.json where logs were visible (before 404s replaced 504s)
CURRENT STATUS:
SSR works, API works, logs show successful data fetches
Hydration chunks still ghosted or misrouted
Static assets either 504 or 404 depending on rewrite config
Manifest is present, but Vercel doesn’t preload chunks
REQUEST:
Looking for guidance from anyone who’s successfully deployed Vike SSR to Vercel — especially around manifest visibility, chunk routing, and hydration shell alignment. Is there a known config pattern that restores chunk delivery?
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions