nextjs - 💡(How to fix) Fix Wrong link in TSDoc redirects to Pages Router instead of App Router [2 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#84309Fetched 2026-04-08 02:19:53
View on GitHub
Comments
2
Participants
2
Timeline
14
Reactions
0
Assignees
Timeline (top)
closed ×2commented ×2labeled ×2assigned ×1

Code Example

N/A
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

https://github.com/vercel/next.js/blob/8e11bf4a9e01df18a8f5f60d9238c44b6189f4e8/packages/next/src/server/lib/router-utils/typegen.ts#L322

To Reproduce

When clicking on type references in the TSDoc (for example, Link ), the link redirects to the Pages Router docs instead of the App Router docs.

This creates unnecessary friction for users working with the App Router, as they have to take an extra step to navigate back to the correct documentation.

Steps to Reproduce:

  1. Open Link component docs
  2. Click on a type reference in the TSDoc.
  3. Notice it redirects to the Pages Router version of the documentation.

Current vs. Expected behavior

Type references in TSDoc should link directly to the relevant App Router documentation (or at least resolve to the correct context based on the page being viewed).

Provide environment information

N/A

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

TypeScript

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

Other (Deployed)

Additional context

No response

extent analysis

TL;DR

Update the type reference links in the TSDoc to point to the App Router documentation instead of the Pages Router documentation.

Guidance

  • Verify that the type reference links are correctly generated in the typegen.ts file, specifically at line 322.
  • Check if the Link component documentation has the correct links to the App Router documentation.
  • Test the type reference links in different contexts to ensure they resolve to the correct documentation.
  • Consider updating the documentation generation process to account for the differences between the Pages Router and App Router.

Example

No code snippet is provided as the issue is related to documentation links and not code functionality.

Notes

The solution may require updates to the Next.js documentation generation process or the typegen.ts file. Without more information about the documentation generation process, it's difficult to provide a more specific solution.

Recommendation

Apply workaround: Update the type reference links manually or through a script to point to the correct App Router documentation, as the root cause of the issue is likely due to incorrect link generation.

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