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
American black bearOP
Hi all, while I'm deploying my project to vercel, I'm getting this error.
Any help is appreciated!

13 Replies

@American black bear Hi all, while I'm deploying my project to vercel, I'm getting this error. Any help is appreciated!
There is no workaround of this. You need to reduce the size of your function
American black bearOP
how can I do this?
maybe visit the link in that screenshot?
American black bearOP
@linesofcode I need your help
Yi Lon Ma
I just visited the link
Currently I'm using AWS.
@American black bear Click to see attachment
make first try reducing dependencies?
American black bearOP
I think so but I'm not sure how to do that
@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