I am try to build my nextjs app in aws amplify
My nodejs v20 and nextjs v14
ERROR:
!!! CustomerError: The size of the build output (260454077) exceeds the max allowed size of230686720 bytes. Please reduce the size ofyour build output and try again.
After that Deploy cancelled
This is my amplify.yml
file.
<code>version: 1
applications:
- frontend:
phases:
preBuild:
commands:
- nvm install 20
- nvm use 20
- npm install
build:
commands:
- npm run build
artifacts:
baseDirectory: .next
files:
- '**/*'
cache:
paths:
- node_modules/**/*
- .next/cache/**/*
</code>
<code>version: 1
applications:
- frontend:
phases:
preBuild:
commands:
- nvm install 20
- nvm use 20
- npm install
build:
commands:
- npm run build
artifacts:
baseDirectory: .next
files:
- '**/*'
cache:
paths:
- node_modules/**/*
- .next/cache/**/*
</code>
version: 1
applications:
- frontend:
phases:
preBuild:
commands:
- nvm install 20
- nvm use 20
- npm install
build:
commands:
- npm run build
artifacts:
baseDirectory: .next
files:
- '**/*'
cache:
paths:
- node_modules/**/*
- .next/cache/**/*
it should deploy properly.