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:
17 Replies
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.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 :)
That was a separate issue!
Oh sorry
the workers service error is unrelated to the nextjs bug
I'm pretty sure the bundle was under 25MB, the site is not big at all
Yeah i misread it :1Sweat:
The broken deployments were submitting ~36MB bundles
Maybe it's including something unexpected?
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 versionMaybe Vercel broke their bundling
I can look more into that next week
All good!
I got my issue fixed for now by reverting the version, now both the build & the real-time logs work.
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
That would make sense yeah
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
so much fun
@Better James Backport release, might fix what they have broken?
yep, looks like the bundling issue is fixed in the new release