Next.js Discord

Discord Forum

Getting: Error: A Serverless Function has exceeded the unzipped maximum size of 250 MB

Unanswered
American black bear posted this in #help-forum
Open in Discord
Avatar
American black bearOP
Hi all, while I'm deploying my project to vercel, I'm getting this error.
Any help is appreciated!
Image

13 Replies

Avatar
There is no workaround of this. You need to reduce the size of your function
Avatar
American black bearOP
how can I do this?
Avatar
maybe visit the link in that screenshot?
Avatar
American black bearOP
@linesofcode I need your help
Yi Lon Ma
I just visited the link
Image
Currently I'm using AWS.
Avatar
make first try reducing dependencies?
Avatar
American black bearOP
I think so but I'm not sure how to do that
Avatar
@American black bear so Next.js api routes are deployed as serverless functions on the edge.
so one of your api route is too big more than 250MB
when you build your project by npm run build you should get bundle sizes for your pages and api routes as well
see which api route is such big first