nextjs deployments not working correctly

Hey, I published a version of nextjs on a cloudflare page using git integration, but it's failing miserably. I would like some help ASAP if possible, the page build succeeds, but nothing of the page itself makes sense. Routes are missing, the front page (static) shows a 404, the real-time logs show this:
No description
17 Replies
Jacob
Jacob9mo ago
Hi @fafa - looks like the issue here is that it's attaching a ton of ESM modules (see the Attaching additional modules section in your logs.) Looks like we have a bug where Functions are silently ignored if the bundle is >25MB. We will look into throwing an error for this next week. In the meantime, look into reducing the size of your bundle.
faye
fayeOP9mo ago
Hey! James actually told me the fix, it's to revert back to 1.4.1.0 instead of using 1.4.1.1. That seems to have fixed it :)
James
James9mo ago
That was a separate issue!
faye
fayeOP9mo ago
Oh sorry
James
James9mo ago
the workers service error is unrelated to the nextjs bug
faye
fayeOP9mo ago
I'm pretty sure the bundle was under 25MB, the site is not big at all Yeah i misread it :1Sweat:
Jacob
Jacob9mo ago
The broken deployments were submitting ~36MB bundles Maybe it's including something unexpected?
faye
fayeOP9mo ago
That's pretty big! I wonder why.. However this deployment does work, using 1.4.1.0? https://25ce9e40.headpat-de.pages.dev/ 25ce9e40-aeaf-4adf-9139-acbcb6e72f35 It's the same deployment, just a different version
James
James9mo ago
Maybe Vercel broke their bundling
Jacob
Jacob9mo ago
I can look more into that next week
faye
fayeOP9mo ago
All good! I got my issue fixed for now by reverting the version, now both the build & the real-time logs work.
James
James9mo ago
Building the stripped back version of your app: - 14.1.1: 1.6M unzipped - 14.1.0: 1.0M unzipped I guess that makes more sense when considering that their functions are no longer being minified
faye
fayeOP9mo ago
That would make sense yeah
James
James9mo ago
although cloudflare's error still needs fixing to accurately reflect what's going wrong, but it seems like the excessive bundle size might be a separate bug that was recently introduced in nextjs to do with how they bundle then fun
faye
fayeOP9mo ago
so much fun
faye
fayeOP9mo ago
@Better James Backport release, might fix what they have broken?
No description
James
James9mo ago
yep, looks like the bundling issue is fixed in the new release
Want results from more Discord servers?
Add your server