You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A monorepo that has turborepo managing only a subsection of the monorepo fails to deploy NextJS code. If the entire repo is a turborepo then Amplify seems to have no issues with deployment.
However when you nest the turborepo under folders like apps/product-frontend like in the example below, it fails to detect the build artifacts as expected
[ERROR]: !!! CustomerError: The 'node_modules' folder is missing the 'next' dependency. This is required at runtime to run your application. If you are using a monorepo framework, you may need to do additionalsetup to ensure the necessary runtime dependencies are included in the build output directory Read more: https://github.com/aws-amplify/amplify-hosting/blob/main/FAQ.md#using-a-monorepo-framework
Hi @a3har 👋 , thanks for reaching out. I was able to reproduce this behavior and will mark it as a bug. I'll report back here with any potential workarounds.
Environment information
Describe the bug
A monorepo that has turborepo managing only a subsection of the monorepo fails to deploy NextJS code. If the entire repo is a turborepo then Amplify seems to have no issues with deployment.
Eg: https://github.com/vercel/turborepo/tree/main/examples/basic
The above example deploys without issues.
However when you nest the turborepo under folders like apps/product-frontend like in the example below, it fails to detect the build artifacts as expected
Eg: https://github.com/a3har/turbo-test
It throws the error below.
[ERROR]: !!! CustomerError: The 'node_modules' folder is missing the 'next' dependency. This is required at runtime to run your application. If you are using a monorepo framework, you may need to do additionalsetup to ensure the necessary runtime dependencies are included in the build output directory Read more: https://github.com/aws-amplify/amplify-hosting/blob/main/FAQ.md#using-a-monorepo-framework
Reproduction steps
Clone the public repo https://github.com/a3har/turbo-test and use the below build settings to deploy.
Env Variables:
AMPLIFY_MONOREPO_APP_ROOT=apps/product-frontend/apps/docs
AMPLIFY_DIFF_DEPLOY=false
The text was updated successfully, but these errors were encountered: