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 theNODE_ENV
env variable todevelopment
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 indicatingProduction code optimization has been disabled in your project
, however the above "Minified React error" message still appear.
- Setting Webpack to