Skip to content
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

The size of the build output exceeds the max allowed size after Nextjs 14 Update #3804

Closed
4 tasks done
gstrobl opened this issue Nov 14, 2023 · 4 comments
Closed
4 tasks done
Labels
archived This issue has been locked. question Further information is requested

Comments

@gstrobl
Copy link

gstrobl commented Nov 14, 2023

Before opening, please confirm:

App Id

NEW_APP

AWS Region

ca-central-1

Amplify Hosting feature

Frontend builds

Question

Hey,
we updated Next to 14.0.2, with Custom Image (public.ecr.aws/docker/library/node:18.17.0).

Now we're facing this issue:

The size of the build output (235208983) exceeds the max allowed size of230686720 bytes. Please reduce the size ofyour build output and try again.

If I check the file size local, I got this one here:

du -h -d 1
152M	./cache
 44M	./server
 60M	./static
260M	.

I'm not sure if it's possible to get rid of the cache folder after the successful build, I think many other people facing this issue, but I didn't found any solution yet.

@gstrobl gstrobl added the question Further information is requested label Nov 14, 2023
@danielkoller
Copy link

I updated my build setting to the latest "Linux 2023" build and have the same problem with Next 14.0.2.

@Jay2113
Copy link
Contributor

Jay2113 commented Mar 1, 2024

Hi @gstrobl @danielkoller 👋 , we have updated our documentation with a troubleshooting guide for the build output size limitation: https://docs.aws.amazon.com/amplify/latest/userguide/troubleshooting-ssr-deployment.html#build-output-too-large. This should enable you to:

  • Download and inspect your build artifacts
  • Measure the size of your compute and static directories
  • Review the dependencies within the node_modules folder
  • Delete the binaries that aren't required at runtime

@Jay2113 Jay2113 closed this as completed Mar 1, 2024
Copy link

github-actions bot commented Mar 1, 2024

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Copy link

github-actions bot commented Mar 1, 2024

This issue has been automatically locked.

@github-actions github-actions bot added the archived This issue has been locked. label Mar 1, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived This issue has been locked. question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants