on-internet
← Community

nextjs - use _error.js in dev mode

Stack Overflow ·

So I am creating a custom error page on my nextjs application. Following the documentation, I created a _error.js file with my view in it (in React) My issue is when I am in dev mode, my _error page is completely ignored (even though it goes through its getInitialProps). The render function seems to be ignored and instead nextjs seems to be using its internal error-debug page. If I am right, that is what this code says from the repo (line 84 for the current version) When I build with as a production env, no problem, my custom error page is picked up. Any idea on how to render my custom error p

Comments

Sign in or sign up to comment and upvote.

No comments yet.