nextjs - ✅(Solved) Fix Docs: MiddlewareConfig is missing runtime field in type def [1 pull requests, 1 comments, 2 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#84565Fetched 2026-04-08 02:19:01
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
3
Author
Participants
Timeline (top)
commented ×1cross-referenced ×1issue_type_added ×1

Fix Action

Fixed

PR fix notes

PR #84587: Draft: fix: Add runtime field to MiddlewareConfig type

Description (problem / solution / changelog)

This field was added recently, it seems like this was just an oversight?

Fixes #84565

Changed files

  • packages/next/src/build/segment-config/middleware/middleware-config.ts (modified, +6/-1)
RAW_BUFFERClick to expand / collapse

What is the documentation issue?

Docs mention the option to specify runtime, but when using the MiddlewareConfig type, that field is not allowed according to the type definition.

Is there any context that might help us understand?

Next v15.5.4

Does the docs page already exist? Please link to it.

https://nextjs.org/docs/app/api-reference/file-conventions/middleware

extent analysis

TL;DR

  • The MiddlewareConfig type in Next.js v15.5.4 may need an update to include the runtime field as per the documentation.

Guidance

  • Review the MiddlewareConfig type definition to confirm if the runtime field is indeed missing.
  • Check the Next.js documentation and release notes for any updates or corrections related to the MiddlewareConfig type.
  • Verify if there are any open issues or pull requests on the Next.js GitHub repository addressing this discrepancy.
  • Consider reaching out to the Next.js community or maintainers for clarification on the intended usage of the runtime field with MiddlewareConfig.

Notes

  • The issue seems to be related to a potential documentation inconsistency or a missing field in the type definition, rather than a code implementation problem.
  • Without further information on the specific use case or error messages, it's challenging to provide a more detailed solution.

Recommendation

  • Apply workaround: Use a different configuration approach that does not rely on the MiddlewareConfig type, or wait for an update to the Next.js documentation or type definitions that resolves the inconsistency.

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 Docs: MiddlewareConfig is missing runtime field in type def [1 pull requests, 1 comments, 2 participants]