-
Notifications
You must be signed in to change notification settings - Fork 29.9k
Labels
Error OverlayRelated to Next.js's error overlay.Related to Next.js's error overlay.
Description
Link to the code that reproduces this issue
https://github.com/madebyfabian/nextjs-error-mismatch-reprod
To Reproduce
- Start the application in development
- Visit localhost:3000
Current vs. Expected behavior
Current:
Browser Error shows "Next.js navigation API is not allowed to be used in Pages Router." even though we are only using app router in this reproduction.

Console error is correct:
⨯ Error: Next.js navigation API is not allowed to be used in Proxy.
at proxy (proxy.ts:5:10)
3 |
4 | export async function proxy(request: NextRequest) {
> 5 | notFound()
| ^
6 | }
7 | {
digest: 'NEXT_HTTP_ERROR_FALLBACK;404'
}Expected: The error shown in the browser should be correct and the same shown as in the console.
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 25.1.0: Mon Oct 20 19:34:05 PDT 2025; root:xnu-12377.41.6~2/RELEASE_ARM64_T6041
Available memory (MB): 49152
Available CPU cores: 14
Binaries:
Node: 22.17.1
npm: 10.9.2
Yarn: N/A
pnpm: 10.17.1
Relevant Packages:
next: 16.0.5 // Latest available version is detected (16.0.5).
eslint-config-next: N/A
react: 19.2.0
react-dom: 19.2.0
typescript: N/A
Next.js Config:
output: N/AWhich area(s) are affected? (Select all that apply)
Error Overlay
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
Found the two files where these are defined:
Client: https://github.com/vercel/next.js/blob/canary/packages/next/src/client/index.tsx#L933
Proxy: https://github.com/vercel/next.js/blob/canary/packages/next/src/build/templates/middleware.ts#L45
Metadata
Metadata
Assignees
Labels
Error OverlayRelated to Next.js's error overlay.Related to Next.js's error overlay.