-
Notifications
You must be signed in to change notification settings - Fork 10
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
getting too much size of build #23
Comments
Hi thanks for reporting. I see, due to the way pnpm works, I think it should get around that issue if you're willing to switch to it. Otherwise feel free to make a PR for any better solutions as I'm unsure of any. Cheers. |
Hi guys. Did you find a solution? I have the same problem. |
Hi do you have a project I can look at? |
In the end I was able to transfer some libraries to dev, and it stopped giving me problems. Thank you anyway. |
i actually use bun to install dependencies not sure if that can be the problem, @alexnguyennz can you update the readme and make a test with bun ? also here thinking about something the 404 page can be done with
|
I wasn't aware Bun could be used with Amplify - what sort of build spec are you using? I see now Bun can be used with Windows so I could try this. Searching htaccess with Amplify doesn't seem to have any results unfortunately, except for this post saying it's not used. |
this is my configuration to set my environment normally, i don't run astro with Bun because is still experimental and don't want some unexpected errors, in linex environment i use the same linux 2023 version: 1
frontend:
phases:
preBuild:
commands:
- nvm install 20.10.0
- nvm use 20.10.0
- npm i -g pnpm
- npm install -g bun
- bun i
build:
commands:
- pnpm build
artifacts:
baseDirectory: dist
files:
- '**/*'
cache:
paths:
- node_modules/**/* |
Hello! It's Erik from AWS Amplify. We have a troubleshooting guide if your bundle size is over the 220mb limit. https://docs.aws.amazon.com/amplify/latest/userguide/troubleshooting-ssr-deployment.html#build-output-too-large |
Thanks Erik, this is helpful. |
I was able to reduce my bundle size by putting the package.json to chatgpt and asking it to look for packages to remove and put in devdependencies |
If I just want to deploy over the max allowed size, is there a solution now? |
Here's a setting that worked for me and removed unnecessary build size by eliminating the step of copying the node_modules. Instead, you can simply reinstall the necessary dependencies directly in the app folder after the build. This helps keep the build smaller and more efficient:
|
😂 lol |
im also getting the same error how did you guys solve it?? 2025-01-16T05:56:50.313Z [ERROR]: !!! CustomerError: The size of the build output (266387500) exceeds the max allowed size of 230686720 bytes. Please reduce the size of your build output (/codebuild/output/src363436870/src/astro-hybrid/.amplify-hosting/compute/default) and try again |
Anyone have tips for when you just can't get the size down enough? Is there potentially an alternate way to use Amplify with Astro where it's set up as an Amplify backend? The funny party is that the |
adding
mv node_modules ./.amplify-hosting/compute/default
is not the correct way to add the adapter you can get thisThe size of the build output (297310198) exceeds the max allowed size of 230686720 bytes. Please reduce the size of your build output
The text was updated successfully, but these errors were encountered: