-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Next.js 13 Amplify - CustomerError: The size of the build output exceeds the max allowed size of 230686720 bytes #3699
Comments
Hi @foobarnes, thanks for the detailed report. We are aware of issues in Next.js 13.4.13+ as they introduced a breaking change in their server handler (vercel/next.js#52492) and we are actively working on a fix. It caught us by surprise as we would normally not expect a breaking change to be introduced on a minor release of next.js. So, apologies for the inconvenience. Could you try downgrading to next.js 13.4.12 in the meantime as we work on stabilizing newer versions? |
Definitely @ferdingler! Thanks so much for getting back so quickly. I'll try that now and update shortly. |
@ferdingler It's a no-go. Still got |
oh, my bad. I should have explained myself. The npm install --save-exact=true [email protected]
# or with yarn
yarn install --exact [email protected] and make sure you commit the changes and push both the package.json and package-lock.json or yarn.lock. |
Sorry, to confirm, I did also pin the specific version of I also just tried to downgrade |
Do you all have any indication of where it is getting the 722400645 bytes figure? The only directory/artifact that is that size near deployment time is
|
On my local:
|
I've also tried redeploying the last commit that deployed successfully. It failed with the same error. |
Hi, sorry for the inconvenience, could you do me a favor to try few things:
Thanks |
|
@victorccccc Removing
|
Thanks for all the information, we will be continue investigating. Will update here as soon as we find something |
An interesting development... When I changed my artifacts:
baseDirectory: .next/server
files:
- '**/*' My deployment "succeeded", but it deployed my test artifacts instead of any frontend build artifacts.
Returning |
@victorccccc When I build standalone in the Amplify build container, I see a standalone size closer to that 700MB we're seeing in the error:
|
@foobarnes thanks for sharing the additional information, this is very helpful. We would like to schedule a call with you to discuss about this further. Can you please reach out via a DM on our community discord server? My username is Thanks! |
Some notable package size differences between locally-generated and amplify-generated
|
For posterity: It didn't work for me, but may for future generations to come. |
We identified that all of the SWC binaries (listed as An unideal workaround that unblocked my deployments: |
Hey guys we are experiencing the same issue after trying to integrate Sentry. I initially thought it's the problem with Sentry but Maintainers of Sentry suggest I should ask here. |
any update? this is blocker for us |
I have the same issue, is there any update on this? |
Hello, I have the same issue, is there any news ? |
I've also been unable to successfully deploy a Next.js 13 app for some time now. |
We've hit this issue too, please share some update if any. Thank you. |
Has anyone tried skipping to next 14/amazon linux 2023 now that this is done #3773 (comment) ? I would try but one of our dependencies needs to fix it's peerdeps |
I've tried it - didn't work for me. |
Just in case that helps, it seems that for me for some reason the error only happens when I use pnpm instead of npm or yarn to install the dependencies. |
Having the same problem with Next 14. |
+1 |
Running into this error. Why can't you increase the limit of 200MB |
We are having the exact same issue! Why can't you increase the hard limit of 200MB. I am sure a company whose value is 1.5 trillion USD, I am sure its not that difficult |
Hi, could you please add a little more explanation on what was the trick and how/why it works? I added your backend commands to my build script, it created a new |
Hi, this is the whole The command i added removes the I hope this helps, i am new to |
Tried adding the backend commands and redeploying, still running into the same issue |
Hi 👋, we recently made the improvement and resolved this issue, please rebuild your application. Feel free to open the new issue if it persists. Thanks |
|
This issue has been automatically locked. |
Before opening, please confirm:
App Id
d263pg34gxs8oh
AWS Region
us-east-1
Amplify Hosting feature
Deployments
Frontend framework
Next.js
Next.js version
13.4.13
Next.js router
Pages Router
Describe the bug
CustomerError: The size of the build output (728699832) exceeds the max allowed size of 230686720 bytes. Please reduce the size of your build output and try again.
Overnight, our deployments have ballooned in size from well under to high above the build size limit (~120,000,000 bytes -> 728,699,832 bytes). Clearly, our application didn't change that drastically between our deployments.
Please do not suggest following these instructions as @Jay2113 did in #3647. Our bundle size should be well under the limit and certainly less than the 728699832 figure given in the error. Plus, those instructions are no longer necessary according to @calavera in #3132.
I am raising this as a separate issue because it just began last night and we do not have enough pages in our app to be anywhere near the ludicrous number provided by the build system.
Expected behavior
Our Next.js 13 app should deploy as usual and be under the bundle size limit for deployment.
Reproduction steps
Build Settings
Log output
Additional information
./web
directory. (appRoot: web
)Here are some dir sizes:
du -h -d1 public
:332K public/images
360K public
du -h -d1 .next/static
:412K .next/static/css
5.0M .next/static/chunks
12K .next/static/4OD3tkW6Bv-qbps3wPd9U
5.4M .next/static
du -h -d1 .next/server
:3.8M .next/server/chunks
44M .next/server/pages
48M .next/server
The text was updated successfully, but these errors were encountered: