这是indexloc提供的服务,不要输入任何密码
Skip to content

global-not-found page not used for notFound() in root layout #86095

@stefanprobst

Description

@stefanprobst

Link to the code that reproduces this issue

https://github.com/stefanprobst/issue-next-global-not-found

To Reproduce

  1. clone repo from https://github.com/stefanprobst/issue-next-global-not-found
  2. pnpm install
  3. pnpm dev
  4. go to http://localhost:3000/xyz
  5. expected to see content from global-not-found but instead see default builtin 404 page

Current vs. Expected behavior

global-not-found should be used for all 404

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: #35~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Oct 14 13:55:17 UTC 2
  Available memory (MB): 31401
  Available CPU cores: 16
Binaries:
  Node: 24.11.0
  npm: 11.6.1
  Yarn: N/A
  pnpm: 10.20.0
Relevant Packages:
  next: 16.0.2-canary.17 // Latest available version is detected (16.0.2-canary.17).
  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)

Not Found

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

next dev (local), next start (local)

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Not FoundRelated to the not-found.tsx file or the notFound() function.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions