Home
Support Forums

Request must be smaller than 69905067 bytes for the CreateFunction operation deploy

Screen Shot 2021-11-10 at 9.54.58 AM

I keep getting this error when building our site with a newly added component using getServerSideProps.
Doing netlify build locally, i can see that the zip file in question is 37.8mb. Any ideas what could be causing this?

We’re using next 12.0.2 with target: 'serverless' on our next.config.js.

Solved by setting node_bundler to "esbuild" (Modern, faster Netlify Functions: New bundler and JavaScript features)

After this encountered another issue getting Unexpected token '?' when accessing the page with getServerSideProps. Solved this by adding AWS_LAMBDA_JS_RUNTIME with value nodejs14.x in Netlify env variables (I’m not entirely sure but this was the next step i took which removed the syntax error).