Help with 1 MiB size limit.

Hi, im trying to deoploy nextjs, next-auth with prisma (with edge runtime configs and prisma accelerate) and i have this isues when deploy on cloudflare pages. "Error: Failed to publish your Function. Got error: Your Functions script is over the 1 MiB size limit (workers.api.error.script_too_large)"
5 Replies
Cyb3r-Jak3
Cyb3r-Jak39mo ago
If you are on the free plan then your workers can only be 1 MB. You need to make your functions smaller usually easiest by having less packages.
Cristobal
Cristobal9mo ago
thanks you, but it's not really using a "worker" what I'm using it's a "page", and I don't really have any packages other than the ones installed by nextjs and next-auth Anything else I can try?
Cristobal
Cristobal9mo ago
No description
Cyb3r-Jak3
Cyb3r-Jak39mo ago
Functions are workers in Pages. Are you using the latest version of next-on-pages. If you are then try asking in #next-on-pages to see if there is a way to cut down
Cristobal
Cristobal9mo ago
i guess, im using 1.6.0