failed deployment - make Vercel happy by fixing edge function sizes

Koko's Coding Sessions Stream 2 years ago

Description

I was about to deploy some cool features, when Vercel build failed. The edge functions are executed close to the end-users across Vercel's global network, and they've got strict size requirements. The maximum compressed size of a Lambda Edge package cannot exceed 50MB, so if you've got this issue focus on reducing imports and overall size for the problematic "module". Try to see how I solved it in my case. Still got issues? Join discord and I can assist you :)

00:00 - 00:19 Problem summary
00:20 - 01:01 Vibing while deploying
01:02 - 04:46 Investigating issue
04:48 - 13:40 Fixing issue
13:41 - 14:27 Pushing and deploying successfully

Join on discord:
https://discord.gg/YrUx2UKTPj

Support me by getting:
- a unique & surprise pair of socks!
https://socksai.io

- a Next-Gen T-Shirt:
https://aicaramba.io

BUT WAIT, there's a -15% discount on any of my platforms with this promo code:
ONLINEKOKO

Subscribe for live streams with full coding sessions.