I have tried several ways available online and also tried aws docs with no luck
I am using nextjs 14 with monorepo and here is my amplify yaml file
version: 1
applications:
- appRoot: apps/blog-mfe
env:
variables:
AMPLIFY_MONOREPO_APP_ROOT: apps/blog-mfe
frontend:
# That zip file is generated by amplify. In local it would be .next folder generated
buildPath: /
phases:
preBuild:
commands:
- npm install -g pnpm
- sh -c 'cd ../../.. && pnpm config set store-dir ./.pnpm-store'
- pnpm install --prefer-offline --filter=blog-mfe
build:
commands:
- pnpm install
- pnpm run build
postBuild:
commands:
- mkdir -p .next/standalone || sudo mkdir -p .next/standalone
- mkdir -p .next/standalone/static || sudo mkdir -p .next/standalone/static
- chmod -R 755 .next
- cp -r apps/blog-mfe/.next/standalone/apps/blog-mfe/. .next/standalone
- cp -r apps/blog-mfe/.next/static/. apps/blog-mfe/.next/standalone/static
- echo 'require("apps/blog-mfe/.next/standalone/apps/blog-mfe/server.js")' > .next/standalone/server.js
artifacts:
files:
- '**/*'
discard-paths: yes
baseDirectory: apps/blog-mfe/.next
App deployment successful but amplify site gives 404. Why? Did any one manage to deploy