How do I debug a nextjs production build?

Viewed 1782

I have a bug (this one) that only happens in production, on the client side.

Next.js by default silences all error messages in production, and turns off all logging client side. This makes it almost impossible to debug what's going on when an error is in production-mode only.

Is there a flag or some other setting that will allow me to debug code built by next.js for production?

1 Answers
npm run build && NODE_OPTIONS='--inspect' npm run start 
Related