Amplify - 404 error when deploying Nextjs App

0

Hi, I'm trying to deploy a Nextjs (v12) to Amplify.

All the checkmarks are green, but when I visit the URL (provided by AWS), it 404.

My build settings :

version: 1
frontend:
  phases:
    preBuild:
        commands:
            - npm ci
    build:
      commands:
        - npm run buildamp
  artifacts:
    baseDirectory: .next
    files:
      - '**/*'
  cache:
    paths:
      - node_modules/**/*

The command npm run buildamp is simply next build

The build directory is indeed .next. I have no /src directory.

The App is quite big and old, with both TS and JS files. There are some dubious settings in tsconfig.json, jsconfig.json and next.config files.

What should I look into to find the source of the error ?

Thanks !

  • What directory are your pages stored in? What version of Next are you using?

質問済み 1年前155ビュー
回答なし

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ