Max allowed size error in Amplify deployment

0

Hi!, I'm trying to deploy my NextJS app in Amplify, but I'm certainly struggling to accomplish it. I've been searching for possible solutions, but I cannot find a proper for my case. I'm getting the following error:

Enter image description here

I have tried, as the troubleshooting documentation says, with this:

- allfiles=$(ls -al ./.next/standalone/**/*.js)
- npx esbuild $allfiles --minify --outdir=.next/standalone --platform=node --target=node16 --format=cjs --allow-overwrite

and changing my next.config.js with:

output: standalone

but in the build process I get and errors saying that the standalone folder cannot be find. Could you please help me to put some light on this?

This is my amplyfy.yml:

version: 1
frontend:
  phases:
    preBuild:
      commands:
        - nvm use $VERSION_NODE_16
        - npx pnpm config set node-linker hoisted
        - npx pnpm install
    build:
      commands:
        - npx pnpm run build
  artifacts:
    baseDirectory: .next
    files:
      - '**/*'
  cache:
    paths:
      - node_modules/**/*
K Ortiz
질문됨 9달 전89회 조회
답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠