Your Functions script is over the 1 MiB size limit (workers.api.error.script_too_la

I’ve been working on a Next Js app

Everything was working well, but recently when I added new routes (2nd routes) to the app and tried to deploy them on the Cloudflare page it gave the following error

Here is how my files looks like


"use client";

//Some import statements

export const runtime = "experimental-edge";

export default function Page({ data }: MarketPlaceData) {
// other code 

in /pages/user/index.tsx same structure is placed

now, the Issue is when I use more than 1 route it gives the size limit error Your Functions script is over the 1 MiB size limit, I don’t understand why it is like that, and If I don’t use “experimental-edge” or “edge” function size after compress looks fine, but then I can’t deploy and it was saying to use “edge” or “experimental-edge”

Can’t I deploy without “edge” and use Node js on Cloudflare?

Please help to fix this, thank you!

Hi there,

1MB is the size limit for Workers Free, upgrade to Workers Paid to have the limit increased to 10MB.

Take care.