-
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 #3647
Comments
hey,👋 thanks for raising this! I'm going to transfer this over to our hosting repository for better assistance 🙂. |
Hi @karloespiritu 👋 , thanks for sharing the detailed information about the issue you are experiencing while deploying your Next.js application using Amplify Hosting. Unfortunately, the 200 MB build output size is a hard limitation at the moment. Generally, our recommendation to reduce the build output size is as follows:
Based on the size of the files in your |
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
Hi @Jay2113 We already tried the 2 solutions you suggested, but the size reduction is insignificant to avoid reaching the 200MB limit. The 'dynamic routes' option is also not viable for our use case, as our application has a multitude of unique page routes that are indeed essential. The 200MB limit is just too small to be hard limit for any modern large-scale Next.js app. A lot of other users of Amplify also experienced the same issue. Here are some examples:
Is there any plan any time soon to increase the maximum bundle size limit for Amplify? If not, which AWS service can be used to host a large Next.js 13 application instead? |
+1 |
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 |
|
@victorccccc Could you confirm when the improvement was made and what the improvement is? We saw this limit just last week. |
This issue has been automatically locked. |
hi @pachoclo - this improvement was pushed out today. The team added logic to remove unnecessary packages for production that are typically large. Can you give it another try and let us know? |
Before opening, please confirm:
App Id
d2moft81gtdgs7
Region
us-west-2
Environment name
Frontend builds
Figma File Version (if applicable)
No response
Amplify CLI Version
No response
If applicable, what version of Node.js are you using?
18.13
What operating system are you using?
Mac
Browser type?
Chrome
Describe the bug
CustomerError: The size of the build output (264015647) exceeds the max allowed size of 230686720 bytes. Please reduce the size of your build output and try again.
I'm aware that Amplify has a limit of 200MB build output size for Next.js 12 and 13 apps. But our application is big and the 200MB limit is just too small for any large application. Many large-scale apps built with Next.js exceed the 200MB build output as demonstrated by other users who reported the same issue.
We already followed the build step command in the Amplify docs on how to reduce the build output size, but the size reduction is not enough to reduce the build output to less than 200MB.
du -h -d1 public
:12K public/js
128K public/favicon
3.2M public/img
48K public/sounds
120K public/json
4.0K public/maintenance
3.6M public
du -h -d1 .next/static
:636K .next/static/css
12M .next/static/chunks
28K .next/static/puGf1Ftyu3ImEPqhcvPhF
264K .next/static/media
13M .next/static
du -h -d1 .next/server
:5.1M .next/server/chunks
62M .next/server/pages
67M .next/server
Expected behavior
Build runs successfully.
Reproduction steps
Run build, then await for build to complete.
Project Identifier
No response
Additional information
The text was updated successfully, but these errors were encountered: