next.js icon indicating copy to clipboard operation
next.js copied to clipboard

global-error.js doesn't work next 14.1.0

Open Rich-Warrior opened this issue 1 year ago • 1 comments

Link to the code that reproduces this issue

https://github.com/Rich-Warrior/global-error.tsx

To Reproduce

global-error.tsx does not work in either version 13 or 14.1.0. the problem it seems to have been fixed. I do everything according to the documentation but it doesn’t work for me.

Current vs. Expected behavior

global-error.js should work as written in the documentation.

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 10 Pro
Binaries:
  Node: 18.18.2
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 14.1.0
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.3.3
Next.js Config:
  output: N/A

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

App Router

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

next start (local)

Additional context

I used 14.1.0 and 14.0.5-canary.53.

Rich-Warrior avatar Jan 30 '24 17:01 Rich-Warrior

im having the same issue with error.tsx. I get 404 not found

Keoooo avatar Feb 01 '24 02:02 Keoooo

It could be working in production mode. To test it build and start project

EmilMirzeyev avatar Feb 02 '24 06:02 EmilMirzeyev

Tested in production mode (build + start), still no luck on 14.1.0...

Borisstoy avatar Feb 13 '24 19:02 Borisstoy

The reproduction looks working correctly, the global-error will only work in production, in dev mode we'll show the error itself. If it's static by default, it will error. If it's dynamic page, it will show global-error when you visit it

huozhi avatar Feb 28 '24 00:02 huozhi

This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

github-actions[bot] avatar Mar 13 '24 12:03 github-actions[bot]