vercel-examples icon indicating copy to clipboard operation
vercel-examples copied to clipboard

Error: The Serverless Function "api/index" is 68.16mb which exceeds the maximum size limit of 50mb. Learn More: https://vercel.link/serverless-function-size

Open matt-j-m opened this issue 2 years ago • 2 comments

Running into the above error. Steps to reproduce:

  1. Clone example https://github.com/juicyfx/vercel-examples/tree/master/php
  2. Update runtime to [email protected] in vercel.json
  3. Attempt to deploy

This is my first time using Vercel, sorry if I am missing something basic.

Here is the full output from Vercel

[13:58:13.793] Cloning github.com/***************************** (Branch: *************, Commit: *******) [13:58:16.783] Cloning completed: 2.990s [13:58:16.938] Restored build cache [13:58:16.993] Running "vercel build" [13:58:17.592] Vercel CLI 28.12.7 [13:58:17.782] > Installing Builder: [email protected] [13:58:21.951] 🐘 Downloading user files [13:58:21.952] 🐘 Downloading PHP runtime files [13:58:21.971] 🐘 Creating lambda [13:58:22.367] Build Completed in /vercel/output [420ms] [13:58:28.894] Failed to process build result for "api/index". Data: {"type":"Lambda"}. [13:58:28.897] Error: The Serverless Function "api/index" is 68.16mb which exceeds the maximum size limit of 50mb. Learn More: https://vercel.link/serverless-function-size

matt-j-m avatar Jan 20 '23 04:01 matt-j-m

Forgot to add, my entire project is 11.8 KB, not sure where the "68.16mb" is coming from

matt-j-m avatar Jan 20 '23 04:01 matt-j-m

Hey Matt,

Check the sources tab in the vercel project to see exactly what files have been copied.

Prevent unnecessary files by using a .vercel ignore file.

https://vercel.com/guides/prevent-uploading-sourcepaths-with-vercelignore

On Fri, 20 Jan 2023 at 6:09 AM, Matt Mulhall @.***> wrote:

Forgot to add, my entire project is 11.8 KB, not sure where the "68.16mb" is coming from

— Reply to this email directly, view it on GitHub https://github.com/juicyfx/vercel-examples/issues/113#issuecomment-1397900145, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEHQ6OL6AHEQFCCN33Z3V3WTIFXJANCNFSM6AAAAAAUBCZJYM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Roland Ihms mobile :+264 81 886 3437

Solutions to your web problems Please consider the environment before printing this mail.

rolandihms avatar Jan 20 '23 05:01 rolandihms