[turbopack] [next/og] monorepo fails to resolve workspace node_modules in root node_modules #65614
Labels
bug
Issue was opened via the bug report template.
linear: turbopack
Confirmed issue that is tracked by the Turbopack team.
locked
Module Resolution
Module resolution (CJS / ESM, module resolving)
Turbopack
Related to Turbopack with Next.js.
Link to the code that reproduces this issue
https://github.com/dylanirion/og-monorepo
To Reproduce
cd apps/app && pnpm run dev
http://localhost:3000/opengraph-image
Current vs. Expected behavior
Following the steps in the previous section, I expect to see an image with black text "About Acme" on a white background. This is the case when using webpack instead of turbopack.
A 500 error occurs instead, where it appears node is trying to resolve a filepath from the project root node_modules folder, inside the workspace node_modules folder
Provide environment information
Operating System: Platform: linux Arch: x64 Version: #1 SMP Fri Mar 29 23:14:13 UTC 2024 Available memory (MB): 13982 Available CPU cores: 12 Binaries: Node: 20.11.1 npm: 10.7.0 Yarn: 1.22.19 pnpm: 9.1.0 Relevant Packages: next: 14.3.0-canary.54 // Latest available version is detected (14.3.0-canary.54). eslint-config-next: 14.3.0-canary.54 react: 18.3.1 react-dom: 18.3.1 typescript: 4.8.4 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Module Resolution, Turbopack
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
The reprex is based on the monorepo with turbopack example and minimal changes to bring next up to date.
I encountered this error in 14.2.3 but have not traced it back to earlier commits.
The text was updated successfully, but these errors were encountered: