next.js
next.js copied to clipboard
global-error.js doesn't work next 14.1.0
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.
im having the same issue with error.tsx. I get 404 not found
It could be working in production mode. To test it build and start project
Tested in production mode (build + start), still no luck on 14.1.0
...
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
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.