nextjs - ✅(Solved) Fix cacheComponents and intercepting routes problem [1 pull requests, 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#86444Fetched 2026-04-08 02:10:59
View on GitHub
Comments
3
Participants
3
Timeline
13
Reactions
2
Assignees
Timeline (top)
commented ×3cross-referenced ×2referenced ×2assigned ×1

Fix Action

Fixed

PR fix notes

PR #7: Skip prerender for intercepting routes with cacheComponents enabled

Description (problem / solution / changelog)

What?

This PR fixes an issue where intercepting routes caused errors during prerender with the cacheComponents feature enabled. It adds a check to detect these routes and prevents prerendering for them.

Why?

Intercepting routes rely on the Next-URL header, which may not be available during prerender. Skipping prerender for these routes ensures the feature works as expected without errors.

How?

  • Added a pathCouldBeIntercepted() method to check if a route can be intercepted.
  • Implemented a check for intercepting routes before initiating prerender with cacheComponents.
  • Updated loadManifests() to be accessible for interception route pattern checks.
  • Marked intercepting routes as dynamic and skipped prerender for them.

Fixes #86444

Changed files

  • packages/next/src/server/route-modules/app-route/module.ts (modified, +91/-0)
  • packages/next/src/server/route-modules/route-module.ts (modified, +1/-1)

Code Example

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 10 Pro
  Available memory (MB): 12183
  Available CPU cores: 8
Binaries:
  Node: 22.11.0
  npm: 11.6.2
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 16.0.3 // Latest available version is detected (16.0.3).
  eslint-config-next: N/A
  react: 19.2.0
  react-dom: 19.2.0
  typescript: 5.9.2
Next.js Config:
  output: N/A
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

https://github.com/remi-k-work/total-recall-ai

To Reproduce

Please go to my Vercel's Community post, where I provided screenshots as well, if you do not mind:

https://community.vercel.com/t/cachecomponents-and-intercepting-routes-problem/28213/5

Thank you, {Remi}

Current vs. Expected behavior

Please go to my Vercel's Community post, where I provided screenshots as well, if you do not mind:

https://community.vercel.com/t/cachecomponents-and-intercepting-routes-problem/28213/5

Thank you, {Remi}

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 10 Pro
  Available memory (MB): 12183
  Available CPU cores: 8
Binaries:
  Node: 22.11.0
  npm: 11.6.2
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 16.0.3 // Latest available version is detected (16.0.3).
  eslint-config-next: N/A
  react: 19.2.0
  react-dom: 19.2.0
  typescript: 5.9.2
Next.js Config:
  output: N/A

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

cacheComponents

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

Vercel (Deployed)

Additional context

No response

extent analysis

TL;DR

Review the cacheComponents configuration in the Next.js project to ensure it is correctly set up for the Vercel deployment environment.

Guidance

  • Check the next.config.js file for any custom configurations related to cacheComponents that might be causing the issue.
  • Verify that the cacheComponents option is properly enabled or disabled according to the project's requirements.
  • Investigate the Vercel community post provided for more context on the issue and potential workarounds.
  • Consider testing the project locally to see if the issue is specific to the Vercel deployment environment.

Notes

The provided information lacks specific details about the issue, so it's difficult to provide a more targeted solution. Reviewing the Vercel community post and the project's configuration files may help identify the root cause of the problem.

Recommendation

Apply workaround: Review and adjust the cacheComponents configuration as needed to resolve the issue, as the problem seems to be related to this specific feature.

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 cacheComponents and intercepting routes problem [1 pull requests, 3 comments, 3 participants]