Netlify Site Name: minicorn.netlify.app
I am trying to use the getServerSideProps
Next.js method on our site’s index route and when I do the resulting build always returns the following error:
{“errorType”:“Function.ResponseSizeTooLarge”,“errorMessage”:“Response payload size (14412901 bytes) exceeded maximum allowed payload size (6291556 bytes).”}
This seems to be only when I use this method on our index route. I tested it on another route and it works. After poking around I noticed it might be something to do with bundle size so I enabled the esbuild
node bundler to our netlify.toml
file but that didn’t seem to fix it. I also tested removing all non-React imports in the index
component to see if it was some external library causing it but that didn’t work either.
I am currently testing this via a branch deploy.
Latest Build Logs: Netlify App
Build Preview: https://60a52820ace87b0007d7ef17--minicorn.netlify.app/
Current netlify.toml
:
[functions]
node_bundler = "esbuild"
external_node_modules = ["@ampproject/toolbox-optimizer"]
The external_node_modules
was added based on the suggestion in the build logs.
Any help would be much appreciated.
Thanks