How do I test the "global-error.js" page locally?

I tried throwing an error in the RootLayout, random components, as well as throwing an error on a click of a button.

Running my project using npm run dev generates error pop-ups and outputs the error in the browser console.

Running my project using npm run build and npm run start outputs the error in the browser console.

In either case I cannot get the page to show up!

Hi, @khesualdo! Welcome to the Vercel Community :smile:

Could you share more on the errors you are seeing?

My goal is to see the custom error page I have created in app/global-error.js

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.