-
Notifications
You must be signed in to change notification settings - Fork 113
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 #3863
Comments
2023-12-19T07:14:02.836Z [INFO]: # Caching completed |
Issue above has been abruptly closed without providing any details .. Creating this new ticket 200MB limit is still there : why can it not be removed? |
Can anyone suggest how we can move out of this Amplify to some other service which does not have this limit? Any recommendation? Our production builds are failing and we need to find alternatives very quickly. Business loss. Thanks. |
I'm sorry to hear you are experiencing this issue. We made changes last week that removed non-critical known to be large packages to help stay below the 200MB limit. Can you look at your output and breakdown the different packages and let me know? Running also, what is your Amplify App ID? It looks like a hash ID |
Hi 👋 , sorry for the inconvenience. We added logic to remove unneeded dependency files that are typically large (e.g some unused heavy binaries under To review your build output folder, you can:
The bundle size issue could happen if your app has heavy dependencies. You can check size of the dependency under the If you need further assistance could you please provide your appId? Thanks |
Thanks @victorccccc @mauerbac for quick revert.. App ID: dkc2twse2pm4r ==
|
I tried to do some basic maths to find out upper limit on number of pages which could be released on my website with this 200MB limit. I roughly measured storage when I had 70 pages (case 1) and 700 pages (case2) (each page similar size in KB) . In case 1, total size was ~95MB. In case 2, total size was ~175MB. So if there is basic overhead of size A and per page need size B, then A + 70B = 95 B = ~120KB (it matches with the size visible on Chrome) This means, no matter what optimization we do, at some point when page count go up, it'll break 200MB barrier even when all other things are optimized. Our page count will double in next one week, What's the solution here? |
There is another duplicated issue, @jitendra-koodo I found two solutions
|
I've encountered this issue today and here's what made it work for me: I noticed that the failing frontend build logs had the following lines as compared to non-failing ones:
A few days prior, someone on the team used a different nodejs version which rewrote entire package-lock.json in version 2 format instead of version 3.
The only swc package that was still remaining in package-lock.json was I pasted back the removed packages from the diff in to package-lock.json, ran Committed this file, pushed to git, and the build went through. This time no swc lock file warning and no out of space warnings as well. Now the question is, how did I have those swc packages initially? Maybe they were installed during create next app. But if so, that means it's unreliable to re-create package-lock.json, because it will not include swc for other architectures (unless there's a better way to do this?) Hope this helps someone. |
I'm facing the same error. After digging into
Seems that Amplify is already trying to do the same under the hood but probably it's missing some file. |
Another little update is that I'm wondering why amplify is bothering on
|
Point is that even with all these small optimizations, at some point you are going to hit the 200MB limit and at that point you have to move out of Amplify |
@jitendra-koodo I know this is frustrating, but every solution has it's own limits. |
@ggorge-etiqa Not sure what you mean.. which other solution has 200MB limit? moreover this limit is not shown anywhere on console at any point of time. People go to that doc only after hitting this limit. |
Rebump. I ran into this bug with Nextjs 14 and a very basic starter app. After using #3863 (comment) I was able to resolve |
where did you added those lines? at the end of build phase? i tried only this line and got an error related to swc at the end of "cloning git" step. don't know if it was a coincidence and a temp error, but in a desperate way i changed my build file to this:
and it worked, lol. in the next update i'll try to change this, today we are very hurry here. by the way: my local .next folder, after cleaned up and made from next build is 199mb size. if bundle limit is 200 it's at the limit anyway, but i couldn't find anything unused to remove from dependencies or imports. |
We have the same issue. |
I'm also experiencing this issue even after upgrading to Next 14! Is there any update from AWS on this? I've wasted several hours trying to fix this problem and I have to question why we're being limited to 200mb for our artefacts when the service quotas allow for 5GB? https://docs.aws.amazon.com/amplify/latest/userguide/quotas-chapter.html |
Hello, |
I am having the same issue. This is annoying Next: 14.0.4
|
Adding i.e. version: 1
frontend:
phases:
preBuild:
commands:
- npm ci
build:
commands:
- npm run build
- rm -rf node_modules/canvas |
I did the same thing and it worked, I'm guessing having jest pulls in canvas which is about 100MB+ |
Running into this issue for a second time. Can we please get a clear reason why the 200mb limit is still being enforced? We really don't want to have to switch to a different hosting service... |
Before opening, please confirm:
App Id
new_app
AWS Region
us-east-1
Amplify Hosting feature
Frontend builds
Frontend framework
Next.js
Next.js version
13
Next.js router
App Router
Describe the bug
#3647
Issue above has been abruptly closed without providing any details .. Creating this new ticket
200MB limit is still there : why can it not be removed?
Expected behavior
Build should not fail
Reproduction steps
Build
Front end build steps fails ;:
Build Settings
No response
Log output
Additional information
No response
The text was updated successfully, but these errors were encountered: