Weird Pages NextJS build error

Cant really make it what is wrong with it, its quite a simple app, with nothing fancy going on aswell. Error logs are attached
25 Replies
James
James2y ago
Hello, we don't currently support wasm in next-on-pages, however, it currently has an open PR and you can track the issue at https://github.com/cloudflare/next-on-pages/issues/202 If you aren't the one adding the wasm file, it might be coming from one of your dependencies. Would you be able to try out the prerelease in this PR please? https://github.com/cloudflare/next-on-pages/pull/256
Makisuo
MakisuoOP2y ago
I’m not adding any wasm files myself must be a dependency then yes, will try out the prerelease
Makisuo
MakisuoOP2y ago
got a diffrent error with the prerelease
James
James2y ago
That is... interesting. Would it be possible for you to share a (minimal) reproduction?
Makisuo
MakisuoOP2y ago
Quite late today I’ll create one tmrw
James
James2y ago
Thank you, appreciate it Hello, a fix has just been merged that might have resolved this issue for you. Could you please try out the latest beta package? @cloudflare/next-on-pages@beta
Makisuo
MakisuoOP2y ago
Sorry I got super busy with work, just tried it again and we definntliy got further! It's succesfully building now though I get this error now
Error: Failed to publish your Function. Got error: multipart: message too large
Error: Failed to publish your Function. Got error: multipart: message too large
James
James2y ago
I would assume that might mean your zipped worker files are larger than the limit that pages supports (~25mb), you can double check by zipping the .vercel/output/static/_worker.js directory
Makisuo
MakisuoOP2y ago
Thanks I'll check Hmmn zipped its 2.4mb for me locally and 12mb unzipped @5927
James
James2y ago
Are you on the workers free plan?
Makisuo
MakisuoOP2y ago
No Im on the Pro Plan
James
James2y ago
Welp, that's me stumped then :/
Makisuo
MakisuoOP2y ago
Hmn unlucky :( I can also deploy a page with wrangler just like a worker right?
James
James2y ago
Yeah you just use wrangler pages instead
Makisuo
MakisuoOP2y ago
Ok I'll try that if it works with the local build Hmn cant seem to get it to work. Whats the best way for me to fix this? Would really love swichting from vercel at some point since I have the rest of my infra already on cloudflare but cant seem to get a working build for months now lol. Havent found a way to contact cloudflare directly other than with business plan right?
James
James2y ago
I mean, if you're already on workers paid, I don't really see why you would get an error about the payload being too large. Then again, I don't really know much about the different errors, and the _worker.js directory is relatively undocumented. So, I guess a separate help thread or the community forums might attract someone who knows more about what may help you. Sorry, just to clarify, you said you were on pro. Were you referring to cloudflare pro or the workers paid plan?
Makisuo
MakisuoOP2y ago
Was referring to workers paid plan, i get confused by cloudflares naming schemes sometimes
James
James2y ago
Ah fair enough. Yeah, perhaps someone else would know more about the reasons behind that error if you're within the limits. Maybe a separate help thread would be useful
Makisuo
MakisuoOP2y ago
Alright I'll try my luck with that then thanks for the help! One more thing even if I get it working would you recommend swapping over from vercel for production sites yet? Feels like things are still a bit rocky
James
James2y ago
Considering that I'm one of the contributors, I'm confident about using it for production, especially with all the changes and improvements in v1.
Makisuo
MakisuoOP2y ago
Yee love what you guys have done over the last few months
James
James2y ago
I would expect any errors that pop up now to be edge cases that need special attention, like with wasm for instance
Makisuo
MakisuoOP2y ago
Alright i'll test drive it then IF i get this weird to work sometime soon hopefully ;) thank you so much for your time
James
James2y ago
Sure thing, wishing everything turns out okay 🙂
Want results from more Discord servers?
Add your server