Get "modularize-import-loader" errors when running next 13 with turbo flag #54686
Labels
bug
Issue was opened via the bug report template.
Lazy Loading
Related to Next.js Lazy Loading (e.g., `next/dynamic` or `React.lazy`).
Verify canary release
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 Binaries: Node: 18.14.2 npm: 9.5.0 Yarn: 1.22.19 pnpm: N/A Relevant Packages: next: 13.4.20-canary.11 eslint-config-next: 13.4.19 react: 18.2.0 react-dom: 18.2.0 typescript: 5.2.2 Next.js Config: output: N/A
Which area(s) of Next.js are affected? (leave empty if unsure)
App Router, Dynamic imports (next/dynamic)
Link to the code that reproduces this issue or a replay of the bug
https:github.com/dannygooze/test-turbo-reo
To Reproduce
yarn create next-app --experimental-app
yarn add @headlessui/react
"next dev --turbo"
yarn dev
Describe the Bug
When running a next 13 app with turbo, yarn packages are having a hard time resolving due to the way turbo tries to modularize imports. I have tried updating the next config to get this to work and find the correct modules with no luck.
Here is what I have tried adding in my next config:
modularizeImports: { "@headlessui/react": { transform: "@headlessui/react/dist/components/{{kebabCase member}}/{{kebabCase member}}" } }
Expected Behavior
Expect this to run and import the components from yarn packages.
Which browser are you using? (if relevant)
Chrome
How are you deploying your application? (if relevant)
Vercel
The text was updated successfully, but these errors were encountered: