-
-
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
Vercel Deployments are erroring only in prod (not in dev, not in preview) #10918
Comments
I have the exact same error since I deployed yesterday (nothing grave did really change within the code and reverting the changes and re-deploying didn't fix the error. I'm also using the adapter-vercel). Glad I only pushed to staging yesterday, but this blocks all live deployments, which I will need to hold until the issue gets resolved. |
It looks like the cause is nodejs/undici#2374 in combination with us always polyfilling undici. I suspect that Vercel bumped the Node 18 version recently, which includes this bug, and therefore all subsequent deployments fail. As a quickfix you can tell Vercel to deploy to Node 16 on the settings main page (scroll down to "Node.js version"), or to deploy to the edge runtime instead (if that's possible for your setup). |
So it seems the linked issue was red herring, as it was closed as a duplicate of something else and that issue was fixed and released a few days ago - and I can reproduce this with the latest version of undici. I'm very confused now as to what could cause this. |
Hmm. They edited the issue it was closed in favor of. They were previously saying nodejs/node#50263. Perhaps this is caused by that issue? |
Mhm okay. But why is the polyfill failing with a older versions of undici, too, then? It's very strange, and I'm tempted to add something to the polyfill code to check for specific node versions and not apply them there. |
We only need to polyfill < Node 18.11:
I'd be fine with removing the polyfill on older Node versions. Though it's unclear to me what Node versions are being affected by this bug and whether that would fix anything. |
We can't completely, |
* fix: only apply some polyfills below node 18.11 related to #10918 * Update packages/kit/src/exports/node/polyfills.js Co-authored-by: Ben McCann <[email protected]> * be more defensive * be more defensive --------- Co-authored-by: Rich Harris <[email protected]> Co-authored-by: Ben McCann <[email protected]>
Sveltekit 1.27.1 hopefully fixes this |
Temporarily falling back to node16 on Vercel as suggested in #10918 (comment) circumvented the issue for us. Just updated SvelteKit to Thanks for the quick hotfix @dummdidumm! |
Thanks for confirming the fix |
Describe the bug
see this discussion for more info
Reproduction
repro, just a skeleton project with a
routes/+page.svelte
and aroutes/+page.ts
loading dummy jsonfailed vercel deployment
Logs
System Info
Severity
blocking all usage of SvelteKit
Additional Information
No response
The text was updated successfully, but these errors were encountered: