Build error with dynamic import in pages router introduced in v14.0.3-canary.12 #59235
Closed
1 task done
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`).
linear: next
Confirmed issue that is tracked by the Next.js team.
locked
Module Resolution
Module resolution (CJS / ESM, module resolving)
Link to the code that reproduces this issue
https://github.com/jakst/nextjs-pathfinder-import-fail/tree/pages-import-error (note that the link is to a specific branch)
To Reproduce
pnpm build
(v14.0.4-canary.37 installed)pnpm add next@14.0.3-canary.11 && pnpm build
and observe that the build passespnpm add next@14.0.3-canary.12 && pnpm build
and observe that the build failsCurrent vs. Expected behavior
Currently build crashes. Expected build to pass.
Verify canary release
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.1.0: Mon Oct 9 21:32:11 PDT 2023; root:xnu-10002.41.9~7/RELEASE_ARM64_T6030 Binaries: Node: 21.2.0 npm: 10.2.3 Yarn: 4.0.2 pnpm: 8.10.5 Relevant Packages: next: 14.0.4-canary.37 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: N/A Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Dynamic imports (next/dynamic)
Additional context
I filed a similar issue before #58831 fro the app router, but this is not the same. This one is in the pages router and was introduced at a later point. We didn't discover this one earlier because we were blocked on the error in pages router. Now that the pages router error was fixed in v14.0.4-canary.33 we noticed the one in pages when trying to upgrade.
NEXT-1788
The text was updated successfully, but these errors were encountered: