nextjs - 💡(How to fix) Fix Using useRouter from next/navigation gives this error: (0, _bfcache.useRouterBFCache) is not a function [2 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#85432Fetched 2026-04-08 02:15:44
View on GitHub
Comments
2
Participants
3
Timeline
8
Reactions
1
Timeline (top)
commented ×2labeled ×2closed ×1issue_type_added ×1

Error Message

Current: It is showing this error which is internal error and doesn't relate with the user's codebase. Expected: No error should come as it is not from the user side. Yesterday when i created my next.js project with latest version, i got this error and i tried to find info on this but didn't got the fix and at the end i switched version to next js 15.0.1 and it is working fine and today when i tried running my old project which was working 2 days before on next.js 16 only but today it is not working so i confirmed that it is a issue with next.js 16 not my code.

Code Example

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Thu Jun  5 18:30:46 UTC 2025
  Available memory (MB): 5928
  Available CPU cores: 2
Binaries:
  Node: 22.11.0
  npm: 10.9.1
  Yarn: N/A
  pnpm: 10.15.0
Relevant Packages:
  next: 16.0.0 // Latest available version is detected (16.0.0).
  eslint-config-next: N/A
  react: 19.2.0
  react-dom: 19.2.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/tarunkumar2005/nextjs-issue

To Reproduce

  1. Clone the repo and start the application using next dev or bun run dev.
  2. Open / route and in the terminal it'll show that : GET / 200 in 6.7s (compile: 6.4s, proxy.ts: 13ms, render: 328ms), but it'll show this issue on the website: (0 , _bfcache.useRouterBFCache) is not a function
  3. After searching on internet didn't got anything, i tried to change version of next.js and react to next 15.0.1 and react 19.0.0 and then it worked.

Current vs. Expected behavior

Current: It is showing this error which is internal error and doesn't relate with the user's codebase. Expected: No error should come as it is not from the user side.

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): 5928
  Available CPU cores: 2
Binaries:
  Node: 22.11.0
  npm: 10.9.1
  Yarn: N/A
  pnpm: 10.15.0
Relevant Packages:
  next: 16.0.0 // Latest available version is detected (16.0.0).
  eslint-config-next: N/A
  react: 19.2.0
  react-dom: 19.2.0
  typescript: 5.9.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 dev (local), next build (local), next start (local), Vercel (Deployed)

Additional context

Yesterday when i created my next.js project with latest version, i got this error and i tried to find info on this but didn't got the fix and at the end i switched version to next js 15.0.1 and it is working fine and today when i tried running my old project which was working 2 days before on next.js 16 only but today it is not working so i confirmed that it is a issue with next.js 16 not my code.

extent analysis

TL;DR

Downgrade Next.js to version 15.0.1 as a temporary workaround to resolve the _bfcache.useRouterBFCache is not a function error.

Guidance

  • Verify that the issue persists across different environments (e.g., local development, Vercel deployment) to confirm it's not environment-specific.
  • Check the Next.js changelog and release notes for version 16.0.0 to see if there are any known issues or breaking changes related to _bfcache.useRouterBFCache.
  • Test the application with different versions of React to determine if the issue is specific to the combination of Next.js 16.0.0 and React 19.2.0.
  • Consider opening an issue on the Next.js GitHub repository to report the problem and get official guidance or a fix.

Example

No specific code example is provided as the issue seems to be related to a version-specific problem with Next.js.

Notes

The provided information suggests that the issue is specific to Next.js version 16.0.0, and downgrading to version 15.0.1 resolves the problem. However, this might not be a long-term solution, and it's essential to investigate the root cause and wait for an official fix or guidance from the Next.js team.

Recommendation

Apply the workaround by downgrading Next.js to version 15.0.1, as it has been confirmed to resolve the issue in the provided test case. This should be a temporary solution until an official fix is released for Next.js version 16.0.0.

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