Cloudflare pages build failed

Hii While creating the build i am getting this error “Failed to publish your Function. Got error: Your Functions script is over the 1 MiB size limit (workers.api.error.script_too_large)”. I have purchased workers paid plan. Now when i start my build it crashes every time within a second without any error message.

Hi @rishabh1,

I see 2 projects under your account and both are published.
Which project is throwing this error?

Thank you.

@oshariff

I tried the same by increasing --max-old-space-size=8192 but deployment continued to have the same error as stated.

|14:08:46.399|Success: Finished cloning repository files|
|14:18:58.679|Failed: build exceeded memory limit and was terminated|

Deployment id: 9aff3dcd-9f38-4002-93db-5020409e5a8b
node: 18.17

Would appreciate any help.