Turborepo modules not found when deploying with Vercel with pnpm as package manager #77130
Replies: 3 comments
-
Same issue here |
Beta Was this translation helpful? Give feedback.
-
try setting |
Beta Was this translation helpful? Give feedback.
-
Well I solved it by using the And another case is if your |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
We recently upgraded our NextJS to App Router, in an existing build that had been using Pages Router. Due to some dependency resolution issues under npm, we switched our package manager to pnpm. When running
turbo build
locally, the build succeeds. On Vercel, the build errors withCould not resolve "<package-name>"
, referring to imports of packages listed in thepackages
directory and referred to in the app's package.json as e.g."<package-name>": "workspace:*"
. This preview build has the following vercel.json to override the npm-specific commands we were using before:The error only occurs in a post-install script, which seems to have trouble resolving the dependencies only in the Vercel build.
Additional information
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions