[X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
[X] I have removed any sensitive information from my code snippets and submission.
App Id
d3q127va4gyote
AWS Region
us-east-1
Amplify Hosting feature
Deployments, Frontend builds, Monorepo
Frontend framework
Next.js
Next.js version
13.1.5
Next.js router
Pages Router
Describe the bug
We're building and deploying a NextJS application on Amplify. We have a NX monorepo, and our NextJS app depends on local packages that we add thanks to pnpm workspaces.
However, as per our observation and the documentation, the linkage is done using symlinks which isn't correctly supported by Amplify.
Example:
app is the NextJS application, it depends on the package 'some-dependency' locally
=> Runtime error thrown: Cannot find module 'some-dependency'
Expected behavior
We expect pnpm workspaces to work with its symbolical linkage
Would you know of any alternative?
Reproduction steps
Create a pnpm workspace dependency to your NextJS app
Before opening, please confirm:
App Id
d3q127va4gyote
AWS Region
us-east-1
Amplify Hosting feature
Deployments, Frontend builds, Monorepo
Frontend framework
Next.js
Next.js version
13.1.5
Next.js router
Pages Router
Describe the bug
We're building and deploying a NextJS application on Amplify. We have a NX monorepo, and our NextJS app depends on local packages that we add thanks to pnpm workspaces. However, as per our observation and the documentation, the linkage is done using symlinks which isn't correctly supported by Amplify.
https://docs.npmjs.com/cli/v7/using-npm/workspaces https://pnpm.io/fr/cli/link
Example: app is the NextJS application, it depends on the package 'some-dependency' locally => Runtime error thrown: Cannot find module 'some-dependency'
Expected behavior
We expect pnpm workspaces to work with its symbolical linkage Would you know of any alternative?
Reproduction steps
Build Settings
Log output
Additional information
No response