Enable full error tracing in production builds #66146
Replies: 3 comments 1 reply
-
I am looking for the exact same answer. I need the non-minified errors in my production build to troubleshoot. I am not worried about security in my instance as well. |
Beta Was this translation helpful? Give feedback.
-
Absolutely agree. I recently ran into the similar case. There should be an option to enable descriptive error details for debugging purposes in production builds. |
Beta Was this translation helpful? Give feedback.
-
Maybe this will help you as id did me. I ran into this and was baffled that its not a default, previously working in different languages I always had useful stack traces on the backend side of things, or made sure that I had them which was usually easy and obvious how to do. By default server side stack trace is useless in comparison, e.g.:
To enable better tracing for next I did this after copious amounts of googling:
Take note that both node flag and nextjs option are marked as experimental, so there is no good guarantees of this working properly. After this config my stack traces becomes more useful:
|
Beta Was this translation helpful? Give feedback.
-
How can I enable full error read outs in production builds? I've run in to half a dozen production errors in the last few weeks on the latest versions of nextjs that cannot be reproduced in dev mode - very aggravating - but the errors in production logs are obfuscated, which is frustrating (even in server logs - which is beyond frustrating).
My builds are in staging environments with various kinds of protection, so there's no security issue. How do I enable regular errors?
this should be as easy as putting something in
next.config.js
(or maybe a compile flag similar to--no-mangling
) - does such an option exist?This error (in SERVER LOGS in a local build running on my machine) is not so useful:
Beta Was this translation helpful? Give feedback.
All reactions