nextjs - ✅(Solved) Fix Config wrappers not executing during dev server startup in `16.0.0-beta.0` [1 pull requests, 6 comments, 4 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#84773Fetched 2026-04-08 02:18:28
View on GitHub
Comments
6
Participants
4
Timeline
14
Reactions
0
Author
Assignees
Timeline (top)
commented ×6assigned ×1closed ×1cross-referenced ×1

Fix Action

Fix / Workaround

Workaround: Downgrading to Next.js 15.x resolves the issue.

PR fix notes

PR #671: fix(next): content collections build not started on next.js 16

Description (problem / solution / changelog)

Trying to address: https://github.com/vercel/next.js/issues/84773

Changed files

  • .changeset/serious-parrots-rescue.md (added, +5/-0)
  • packages/next/src/index.ts (modified, +51/-30)

Code Example

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Thu Jun  5 18:30:46 UTC 2025
  Available memory (MB): 7741
  Available CPU cores: 8
Binaries:
  Node: 22.17.0
  npm: 10.9.2
  Yarn: N/A
  pnpm: 10.14.0
  bun: 1.2.22
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/snelusha/nextjs-16-config-wrapper-issue

To Reproduce

  1. Start the application in development (next dev)
  2. Observe that withContentCollections wrapper does not execute
  3. Stop the server with Ctrl+C and the wrapper will execute during shutdown

Current vs. Expected behavior

Current Behavior:

When I run next dev in Next.js 16.0.0-beta, the development server starts successfully, but the withContentCollections config wrapper never executes during startup. The content collections are not processed, so the application runs without them. Only when I stop the server using Ctrl+C does the withContentCollections wrapper finally execute - it processes the content collections and starts watching for changes, but the server is already shutting down at this point.

Note: The config wrapper works as expected when running next build - it only fails during next dev.

Expected Behavior:

The withContentCollections config wrapper should execute immediately when next dev starts, before the server becomes available. Content collections should be processed during the startup phase and the wrapper should start watching for changes while the server is running. This is how it worked correctly in Next.js 15.x - the wrapper would run first, process content, watch for changes, and then the dev server would be ready.

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): 7741
  Available CPU cores: 8
Binaries:
  Node: 22.17.0
  npm: 10.9.2
  Yarn: N/A
  pnpm: 10.14.0
  bun: 1.2.22
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)

Not sure

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

next dev (local)

Additional context

This issue is a regression - the same configuration works correctly in Next.js 15.x.

The config wrapper pattern is commonly used by many Next.js plugins and build-time tools (like MDX processors, content management systems, etc.), so this likely affects other similar packages that wrap the Next.js config, not just @content-collections/next. (not sure)

Workaround: Downgrading to Next.js 15.x resolves the issue.

extent analysis

TL;DR

Downgrade to Next.js 15.x to resolve the issue with the withContentCollections config wrapper not executing during next dev.

Guidance

  • The issue seems to be a regression in Next.js 16.0.0-beta, as the same configuration works correctly in 15.x.
  • Verify that the withContentCollections wrapper is correctly implemented and exported in the Next.js config file.
  • Try to isolate the issue by creating a minimal reproducible example to see if the problem persists in a simplified setup.
  • Consider opening an issue in the Next.js repository, as this affects not just @content-collections/next but potentially other plugins and build-time tools that use the config wrapper pattern.

Example

No code snippet is provided, as the issue is more related to the configuration and versioning of Next.js rather than a specific code implementation.

Notes

The provided workaround of downgrading to Next.js 15.x resolves the issue, but it's not a long-term solution. The root cause of the problem seems to be related to changes in Next.js 16.0.0-beta, and a more permanent fix would require updates to either the @content-collections/next package or Next.js itself.

Recommendation

Apply the workaround by downgrading to Next.js 15.x, as it is a known working version for this specific use case. This will allow development to continue while waiting for a fix in a future version of Next.js.

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

nextjs - ✅(Solved) Fix Config wrappers not executing during dev server startup in `16.0.0-beta.0` [1 pull requests, 6 comments, 4 participants]