nextjs - 💡(How to fix) Fix [Turbopack Nextjs 16]: Turbopack fails to load markdown(x) files only if `mdxRs` is set to `false` [3 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vercel/next.js#84748Fetched 2026-04-08 02:18:37
View on GitHub
Comments
3
Participants
3
Timeline
9
Reactions
0
Timeline (top)
commented ×3labeled ×3closed ×1issue_type_added ×1

Error Message

[email protected] build /home/arunb/work-related/safedep-related/safedep.io-next next build --turbopack

⚠ Invalid next.config.ts options detected: ⚠ Unrecognized key(s) in object: 'conditions' at "turbopack" ⚠ See more info here: https://nextjs.org/docs/messages/invalid-next-config ▲ Next.js 16.0.0-beta.0 (Turbopack)

  • Experiments (use with caution): ✓ webpackMemoryOptimizations

Creating an optimized production build ...


FATAL: An unexpected Turbopack error occurred. A panic log has been written to /tmp/next-panic-d77266035bd3277a2a768b5c0e985bb8.log.

To help make Turbopack better, report this error by clicking here.

Build error occurred Error [TurbopackInternalError]: Failed to write app endpoint /favicon.ico/route

Caused by:

  • Expected process result to be a module, but it could not be processed

Debug info:

  • Execution of get_all_written_entrypoints_with_issues_operation failed
  • Execution of EntrypointsOperation::new failed
  • Execution of all_entrypoints_write_to_disk_operation failed
  • Execution of Project::emit_all_output_assets failed
  • Execution of *emit_assets failed
  • Execution of all_assets_from_entries_operation failed
  • Execution of *all_assets_from_entries failed
  • Execution of output_assets_operation failed
  • Execution of <AppEndpoint as Endpoint>::output failed
  • Failed to write app endpoint /favicon.ico/route
  • Execution of AppEndpoint::output failed
  • Execution of Project::whole_app_module_graphs failed
  • Execution of whole_app_module_graph_operation failed
  • Execution of *ModuleGraph::from_single_graph failed
  • Execution of *SingleModuleGraph::new_with_entries failed
  • Execution of Project::get_all_entries failed
  • Execution of <AppEndpoint as Endpoint>::entries failed
  • Execution of get_app_page_entry failed
  • Execution of ProcessResult::module failed
  • Expected process result to be a module, but it could not be processed at <unknown> (TurbopackInternalError: Failed to write app endpoint /favicon.ico/route) { type: 'TurbopackInternalError' }

Root Cause

Caused by:

  • Expected process result to be a module, but it could not be processed

Code Example

Failed to write app endpoint /(app)/blog/page-1/page

Caused by:
- Expected process result to be a module, but it could not be processed

Debug info:
- Execution of get_written_endpoint_with_issues_operation failed
- Execution of endpoint_write_to_disk failed
- Execution of <AppEndpoint as Endpoint>::output failed
- Failed to write app endpoint /(app)/blog/page-1/page
- Execution of AppEndpoint::output failed
- Execution of get_app_page_entry failed
- Execution of ProcessResult::module failed
- Expected process result to be a module, but it could not be processed

---

> nextjs-turbopack-mdx@0.1.0 build /home/arunb/work-related/safedep-related/safedep.io-next
> next build --turbopack

Invalid next.config.ts options detected: 
Unrecognized key(s) in object: 'conditions' at "turbopack"
See more info here: https://nextjs.org/docs/messages/invalid-next-config
Next.js 16.0.0-beta.0 (Turbopack)
   - Experiments (use with caution):
     ✓ webpackMemoryOptimizations

   Creating an optimized production build ...

-----
FATAL: An unexpected Turbopack error occurred. A panic log has been written to /tmp/next-panic-d77266035bd3277a2a768b5c0e985bb8.log.

To help make Turbopack better, report this error by clicking here.
-----


> Build error occurred
Error [TurbopackInternalError]: Failed to write app endpoint /favicon.ico/route

Caused by:
- Expected process result to be a module, but it could not be processed

Debug info:
- Execution of get_all_written_entrypoints_with_issues_operation failed
- Execution of EntrypointsOperation::new failed
- Execution of all_entrypoints_write_to_disk_operation failed
- Execution of Project::emit_all_output_assets failed
- Execution of *emit_assets failed
- Execution of all_assets_from_entries_operation failed
- Execution of *all_assets_from_entries failed
- Execution of output_assets_operation failed
- Execution of <AppEndpoint as Endpoint>::output failed
- Failed to write app endpoint /favicon.ico/route
- Execution of AppEndpoint::output failed
- Execution of Project::whole_app_module_graphs failed
- Execution of whole_app_module_graph_operation failed
- Execution of *ModuleGraph::from_single_graph failed
- Execution of *SingleModuleGraph::new_with_entries failed
- Execution of Project::get_all_entries failed
- Execution of <AppEndpoint as Endpoint>::entries failed
- Execution of get_app_page_entry failed
- Execution of ProcessResult::module failed
- Expected process result to be a module, but it could not be processed
    at <unknown> (TurbopackInternalError: Failed to write app endpoint /favicon.ico/route) {
  type: 'TurbopackInternalError'
}

---

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Thu Jun  5 18:30:46 UTC 2025
  Available memory (MB): 15583
  Available CPU cores: 16
Binaries:
  Node: 22.15.1
  npm: 10.9.2
  Yarn: N/A
  pnpm: 10.18.2
Relevant Packages:
  next: 16.0.0-beta.0 // Latest available version is detected (16.0.0-beta.0).
  eslint-config-next: 16.0.0-beta.0
  react: 19.1.0
  react-dom: 19.1.0
  typescript: 5.9.3
Next.js Config:
  output: N/A
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

https://github.com/arunanshub/nextjs-16-turborepo-mdx

To Reproduce

Reproduce dev time error

  1. Start the application in dev mode (pnpm dev)
  2. Go to http://localhost:3000/blog/page-1
  3. Observe the crash

Reproduce build time error

  1. Run pnpm build

Current vs. Expected behavior

Dev error

Turbopack version: v16.0.0-beta.0 Next.js version: v16.0.0-beta.0

Error message:

Failed to write app endpoint /(app)/blog/page-1/page

Caused by:
- Expected process result to be a module, but it could not be processed

Debug info:
- Execution of get_written_endpoint_with_issues_operation failed
- Execution of endpoint_write_to_disk failed
- Execution of <AppEndpoint as Endpoint>::output failed
- Failed to write app endpoint /(app)/blog/page-1/page
- Execution of AppEndpoint::output failed
- Execution of get_app_page_entry failed
- Execution of ProcessResult::module failed
- Expected process result to be a module, but it could not be processed

Build error

> [email protected] build /home/arunb/work-related/safedep-related/safedep.io-next
> next build --turbopack

 ⚠ Invalid next.config.ts options detected: 
 ⚠     Unrecognized key(s) in object: 'conditions' at "turbopack"
 ⚠ See more info here: https://nextjs.org/docs/messages/invalid-next-config
   ▲ Next.js 16.0.0-beta.0 (Turbopack)
   - Experiments (use with caution):
     ✓ webpackMemoryOptimizations

   Creating an optimized production build ...

-----
FATAL: An unexpected Turbopack error occurred. A panic log has been written to /tmp/next-panic-d77266035bd3277a2a768b5c0e985bb8.log.

To help make Turbopack better, report this error by clicking here.
-----


> Build error occurred
Error [TurbopackInternalError]: Failed to write app endpoint /favicon.ico/route

Caused by:
- Expected process result to be a module, but it could not be processed

Debug info:
- Execution of get_all_written_entrypoints_with_issues_operation failed
- Execution of EntrypointsOperation::new failed
- Execution of all_entrypoints_write_to_disk_operation failed
- Execution of Project::emit_all_output_assets failed
- Execution of *emit_assets failed
- Execution of all_assets_from_entries_operation failed
- Execution of *all_assets_from_entries failed
- Execution of output_assets_operation failed
- Execution of <AppEndpoint as Endpoint>::output failed
- Failed to write app endpoint /favicon.ico/route
- Execution of AppEndpoint::output failed
- Execution of Project::whole_app_module_graphs failed
- Execution of whole_app_module_graph_operation failed
- Execution of *ModuleGraph::from_single_graph failed
- Execution of *SingleModuleGraph::new_with_entries failed
- Execution of Project::get_all_entries failed
- Execution of <AppEndpoint as Endpoint>::entries failed
- Execution of get_app_page_entry failed
- Execution of ProcessResult::module failed
- Expected process result to be a module, but it could not be processed
    at <unknown> (TurbopackInternalError: Failed to write app endpoint /favicon.ico/route) {
  type: 'TurbopackInternalError'
}

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Thu Jun  5 18:30:46 UTC 2025
  Available memory (MB): 15583
  Available CPU cores: 16
Binaries:
  Node: 22.15.1
  npm: 10.9.2
  Yarn: N/A
  pnpm: 10.18.2
Relevant Packages:
  next: 16.0.0-beta.0 // Latest available version is detected (16.0.0-beta.0).
  eslint-config-next: 16.0.0-beta.0
  react: 19.1.0
  react-dom: 19.1.0
  typescript: 5.9.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Markdown (MDX), Turbopack

Which stage(s) are affected? (Select all that apply)

next dev (local), next build (local)

Additional context

This only occurs in Nextjs 16.0.0-beta.0. This does not happen in Nextjs 15.*. Furthermore, remark and rehype plugins don't work when mdxRs is set to true.

extent analysis

TL;DR

The issue is likely related to the mdxRs option in Next.js 16.0.0-beta.0, and setting it to false might resolve the error.

Guidance

  • Verify that the issue is specific to Next.js 16.0.0-beta.0 by testing with a previous version (e.g., 15.*).
  • Check the next.config.ts file for any unrecognized keys, such as 'conditions', and remove or fix them according to the Next.js documentation.
  • Try setting mdxRs to false in the next.config.ts file to see if it resolves the issue.
  • If using remark and rehype plugins, test them separately to ensure they are not contributing to the error.

Example

No specific code example is provided, as the issue seems to be related to configuration options rather than code implementation.

Notes

The issue appears to be specific to the beta version of Next.js 16.0.0, and the provided error messages suggest a problem with the mdxRs option. However, without more information about the project's configuration and code, it's difficult to provide a definitive solution.

Recommendation

Apply a workaround by setting mdxRs to false in the next.config.ts file, as this might resolve the error. This recommendation is based on the fact that the issue only occurs in Next.js 16.0.0-beta.0 and that the mdxRs option is mentioned in the error messages.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING