4

I'm debugging a tricky issue that only occurs with a Next.js project when in production/deployed to Vercel. Minification is interfering in my ability to debug the issue since issues are reported as:

Uncaught Error: Minified React error #425; visit
https://reactjs.org/docs/error-decoder.html?invariant=425 for the
full message or use the non-minified dev environment for full
errors and additional helpful warnings.

How can I access the full errors and "additional helpful warnings" in production?

  • Is it possible for builds to be done in development mode instead? Setting the build command as NODE_ENV=development next build doesn't seem to work, nor does setting the NODE_ENV env variable to development in Vercel
  • Alternatively, is it possible to disable minification on production builds?
    • Setting Webpack to optimization: { minimize: false } causes the build to output a log indicating Production code optimization has been disabled in your project, however the above "Minified React error" message still appear.
David Chouinard
  • 6,466
  • 8
  • 43
  • 61
  • Did you ever figure it out? I'm getting hydration errors for some users on production. However, the warnings that are produced in dev mode show you where it occurred. The errors aren't super useful in dev mode. Warnings are disabled in production builds so you can't see what caused it. You might be/have been facing a similar issue. – Victor Feb 21 '23 at 20:14
  • Yes was facing the same issue with hydration errors - unfortunately never found a solution and was only able to figure it out through trial and error. – David Chouinard Feb 22 '23 at 22:56

0 Answers0