nextjs - 💡(How to fix) Fix Importing useLinkStatus from next/link breaks when enabling typedRoutes in next.config [4 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#84466Fetched 2026-04-08 02:19:14
View on GitHub
Comments
4
Participants
3
Timeline
12
Reactions
0
Assignees
Timeline (top)
commented ×4labeled ×2assigned ×1closed ×1

Error Message

https://github.com/ruchernchong/use-link-status-error 3. Build throws an error regarding the import

Code Example

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 25.1.0: Fri Sep 19 19:14:26 PDT 2025; root:xnu-12377.40.77.505.1~4/RELEASE_ARM64_T6000
  Available memory (MB): 16384
  Available CPU cores: 8
Binaries:
  Node: 22.18.0
  npm: 10.9.3
  Yarn: N/A
  pnpm: 10.13.1
Relevant Packages:
  next: 15.5.4 // Latest available version is detected (15.5.4).
  eslint-config-next: 15.4.2
  react: 19.2.0
  react-dom: 19.2.0
  typescript: 5.8.3
Next.js Config:
  output: N/A
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

https://github.com/ruchernchong/use-link-status-error

To Reproduce

  1. import { useLinkStatus } from 'next/link
  2. npm|yarn|pnpm|bun run build
  3. Build throws an error regarding the import

Current vs. Expected behavior

Enabling typedRoutes in next.config should work as it should in 15.4

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 25.1.0: Fri Sep 19 19:14:26 PDT 2025; root:xnu-12377.40.77.505.1~4/RELEASE_ARM64_T6000
  Available memory (MB): 16384
  Available CPU cores: 8
Binaries:
  Node: 22.18.0
  npm: 10.9.3
  Yarn: N/A
  pnpm: 10.13.1
Relevant Packages:
  next: 15.5.4 // Latest available version is detected (15.5.4).
  eslint-config-next: 15.4.2
  react: 19.2.0
  react-dom: 19.2.0
  typescript: 5.8.3
Next.js Config:
  output: N/A

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

Linking and Navigating

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

next build (local)

Additional context

No response

extent analysis

TL;DR

  • The issue can likely be resolved by ensuring consistent versions of Next.js and its related packages, such as eslint-config-next, to match the version where typedRoutes is supported.

Guidance

  • Verify that all Next.js related packages are updated to the same version (e.g., 15.5.4) to ensure feature consistency.
  • Check the documentation for next/link and typedRoutes in Next.js version 15.5.4 to confirm the correct usage and any specific requirements.
  • Consider temporarily disabling typedRoutes in next.config to isolate if the issue is specifically related to this feature.
  • Review the build error message for any hints on version inconsistencies or deprecated imports.

Example

No specific code example can be provided without guessing the exact implementation details, but ensuring version consistency is key.

Notes

The provided environment information suggests a potential version mismatch between Next.js (15.5.4) and eslint-config-next (15.4.2), which might cause compatibility issues.

Recommendation

  • Apply workaround: Ensure all Next.js packages are at the same version to avoid potential compatibility issues, as this seems to be the most straightforward step to resolve the build error related to useLinkStatus import.

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