#Aws Amplify - next 15

2 messages · Page 1 of 1 (latest)

fiery cloud
#

Hello, how do you deal with size of build on AWS Amplify?

2024-11-18T10:28:02.665Z [ERROR]: !!! CustomerError: The size of the build output (434093720) exceeds the max allowed size of230686720 bytes. Please reduce the size ofyour build output and try again.

I have this script for amplify

version: 1
frontend:
  phases:
    preBuild:
      commands:
        - npm ci --include=optional
        - npm install --os=linux --cpu=x64 sharp
    build:
      commands:
        - env | grep -e NEXT_PUBLIC_ >> .env.production
        - npm run build
        - du -d 1 -h .next
        - pushd .next/server/pages && find . \( \! -name "*nft.json" -and -name "*.json" \) -exec rm  {} \; && popd
        - du -d 1 -h .next
  artifacts:
    baseDirectory: .next
    files:
      - '**/*'
  cache:
    paths:
      - .next/cache/**/*
      - node_modules/**/*

vestal badgeBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)