Nextra and MDX generation doesn't work with Turbopack #74354
Labels
bug
Issue was opened via the bug report template.
Markdown (MDX)
Related to Markdown with Next.js.
Pages Router
Related to Pages Router.
Turbopack
Related to Turbopack with Next.js.
Link to the code that reproduces this issue
https://github.com/frogermcs/next-issue-reproduce
To Reproduce
In the App Router config, I want to add Nextra, which lands in /pages directory.
Renderring the page without turbopack works as expected, while using turbopack results with error, as described below.
Steps to reproduce:
--turbopack
results with the issue--turbopack
results with page rendered as expected.To reproduce, visit: http://localhost:3001/docs
Console output:
Current vs. Expected behavior
When visiting page while turbopack is enabled, I get server error (console log pasted above)
Server Error
Error: An unexpected Turbopack error occurred. Please see the output of
next dev
for more details.This error happened while generating the page. Any console logs will be displayed in the terminal window.
getServerError
node_modules/next/src/client/components/react-dev-overlay/internal/helpers/node-stack-frames.ts (31:36)
getServerError
node_modules/next/src/client/index.tsx (940:17)
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 24.1.0: Thu Oct 10 21:03:11 PDT 2024; root:xnu-11215.41.3~2/RELEASE_ARM64_T6020 Available memory (MB): 16384 Available CPU cores: 10 Binaries: Node: 22.12.0 npm: 10.9.0 Yarn: N/A pnpm: N/A Relevant Packages: next: 15.1.3 // Latest available version is detected (15.1.3). eslint-config-next: N/A react: 19.0.0 react-dom: 19.0.0 typescript: 5.3.3 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Markdown (MDX), Pages Router, Turbopack
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
I tried it on:
The text was updated successfully, but these errors were encountered: