-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue: Deploying Turborepo Monorepo with Next.js 15 to AWS Amplify #2437
Comments
Transferring this issue as this appears to be related to Amplify console build. |
Hi @ahtisham-gsoftconsulting 👋 , thanks for reaching out. Can you verify a couple of things:
|
hi @Jay2113 local build working fine i try with node 20 also for amplify build but same issue . this issue occur in nextjs 15 . when i downgraded to 14 app working fine |
I'm having the same issue. My setup is:
Build and deploy completed successfully, but I got HTTP ERROR 500 when opening the deployed URL. Hosting compute logs are exactly the same as OP's. |
@ahtisham-gsoftconsulting @lengieng Can you share an example repo which I could use to reproduce this issue? I setup a couple of Next 15 apps with npm workspaces and turborepo but didn't run into this error |
@Jay2113 I finally resolved the Next.js hosting issue on my end. It was related to the different Next.js versions in my frontend apps. I had one using Next.js 14 and the others using Next.js 15. It looked like NPM Workspace had a hard time keeping track of various React versions. I even tried various I ended up upgrading all the frontend to the same Next.js 15 version, and it fixed the frontend hosting issue. I'm still having an issue getting the Amplify Gen 2 backend in this monorepo to build in the Amplify console though. Sandbox is working fine locally. In this case, I think the problem I'm facing now isn't related to this opened issue anymore. I will leave it to the OP to provide the reproducible repo since he is still having the Next.js issue. :) |
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: