Issue: Deploying Turborepo Monorepo with Next.js 15 to AWS Amplify #2437
Labels
hosting
Issue related to Amplify Hosting
investigating
The issue is being investigated
pending-community-response
Issue is pending a response from the author or community
pending-triage
Incoming issues that need categorization
How did you install the Amplify CLI?
i use Amplify console not cli
If applicable, what version of Node.js are you using?
22 and nextjs 15.1.5
Amplify CLI Version
not confirmed
What operating system are you using?
Default
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
I’m currently working on deploying a Turborepo-based monorepo to AWS Amplify, and I’m running into some issues. My setup includes Next.js 15 in the monorepo structure, and the Amplify build successful generated but when i click on link fails with 500 error Here are the key issues I’m facing: logs list in cloud watch node:internal/modules/cjs/loader:1228 2025-01-20T10:10:05.164Z Error: Cannot find module ‘next/dist/server/lib/start-server.js’ here is build settings file node version 22 version: 1 applications:
version: 1
applications:
frontend:
phases:
preBuild:
commands:
nvm use 22
yarn install
build:
commands:
yarn run build --filter=omnipulse
artifacts:
baseDirectory: apps/appname/.next
files:
'/'
cache:
paths:
node_modules//
.next/cache/
/*
apps/appname/node_modules//*
apps/appname/.next/cache/
/*
buildPath: /
appRoot: apps/appname
Describe the bug
I’m currently working on deploying a Turborepo-based monorepo to AWS Amplify, and I’m running into some issues. My setup includes Next.js 15 in the monorepo structure, and the Amplify build successful generated but when i click on link fails with 500 error Here are the key issues I’m facing: logs list in cloud watch node:internal/modules/cjs/loader:1228 2025-01-20T10:10:05.164Z Error: Cannot find module ‘next/dist/server/lib/start-server.js’ here is build settings file node version 22 version: 1 applications:
version: 1
applications:
frontend:
phases:
preBuild:
commands:
nvm use 22
yarn install
build:
commands:
yarn run build --filter=omnipulse
artifacts:
baseDirectory: apps/appname/.next
files:
'/'
cache:
paths:
node_modules//
.next/cache/
/*
apps/appname/node_modules//*
apps/appname/.next/cache/
/*
buildPath: /
appRoot: apps/appname
Expected behavior
Should able to run
Reproduction steps
click here and check faild with 500
https://omnipulse-develop.d3hg6hq52rj16l.amplifyapp.com/
Project Identifier
Log output
no
Additional information
No response
Before submitting, please confirm:
The text was updated successfully, but these errors were encountered: