Skip to content

[BUG] Can't get the official Nextjs sample MDX approach to work with workers #913

@mohsentaleb

Description

@mohsentaleb

I’m trying to get the official Next.js sample for rendering a basic MDX file to work in a workerd environment, but I keep running into the following error:

[wrangler:info] Ready on http://localhost:8787
✘ [ERROR] Uncaught Error: Internal: NoFallbackError Error

I’ve created a minimal reproduction repo here for the team to review:
👉 https://github.com/mohsentaleb/mdx-open-next/tree/next/mdx

Would appreciate any guidance or fixes here 🙏

Steps to reproduce

  1. Clone the repo above.
  2. Install dependencies.
  3. Run the project in workerd using Wrangler (npx wrangler dev) or run npm run preview.
  4. Visit the /articles/welcome page.

Expected behavior

The articles/welcome page should render an MDX file correctly, just like it does when using the standard Next.js build workflow.

@opennextjs/cloudflare version

1.9.0

Wrangler version

4.40.2

next info output

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Thu Jun  5 18:30:46 UTC 2025
  Available memory (MB): 32008
  Available CPU cores: 20
Binaries:
  Node: 20.19.0
  npm: 10.8.2
  Yarn: 1.22.22
  pnpm: N/A
Relevant Packages:
  next: 15.5.4 // Latest available version is detected (15.5.4).
  eslint-config-next: 15.5.4
  react: 19.1.0
  react-dom: 19.1.0
  typescript: 5.9.2
Next.js Config:
  output: N/A

Additional context

  • The articles page imports an MDX file using the passed slug.
  • generateStaticParams is correctly set up so the page can be generated at build time.
  • The same setup works flawlessly with the standard Next.js build, but not in workerd env.

Metadata

Metadata

Labels

documentationImprovements or additions to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions