juicyfx / vercel-examples

📦 Example projects using Vercel platform. Using Node.js, PHP and others.
https://f3l1x.io
MIT License
323 stars 150 forks source link

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 #113

Open matt-j-m opened 1 year ago

matt-j-m commented 1 year ago

Running into the above error. Steps to reproduce:

  1. Clone example https://github.com/juicyfx/vercel-examples/tree/master/php
  2. Update runtime to vercel-php@0.5.2 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: vercel-php@0.5.2 [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 commented 1 year ago

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

rolandihms commented 1 year ago

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.