React - Minified exception occurred

73,514

Solution 1

Setting NODE_ENV to development as Benjamin Gruenbaum pointed out in the comment resolved the issues.

set NODE_ENV=development

Solution 2

If you are encountering this issue with Karma + Webpack, the following Webpack configuration fixed the issue for me when running tests:

plugins: [
    new webpack.DefinePlugin({
        'process.env': {
            NODE_ENV: JSON.stringify('development')
        }
    })
]

Solution 3

I FINALLY SOLVED THIS.

If you're like me and ran that command to set NODE_ENV and it's literally never worked, check if you're linking to react.min.js instead of the full versions of the files.

Link to the full versions and it should work like a charm. :D

Solution 4

If you are using jspm to bundle your code, note that version 0.16.24 imports the minified "production" version of React, which throws this error. My temporary solution was to downgrade jspm to 0.16.23.

edit Future versions of jspm will allow you to declare production vs. development versions (see jspm beta documentation)

Solution 5

I had this issue, and for me I didn't need to disable minification or use react source. My script was just loading before the root element. So I just moved the script out of the head and below the div in the index file source code and that fixed it.

Changed my index.jade from this:

html
 head
   title Super coo site
   script(src="bundle.js")
 body
   div#root

To this:

html
 head
   title Super coo site
 body
   div#root
   script(src="bundle.js")
Share:
73,514
Raathigesh
Author by

Raathigesh

A Software craftsman, trying build cool stuff! In love with the modern web technologies. Also an open source enthusiast! #SOreadytohelp

Updated on July 09, 2022

Comments

  • Raathigesh
    Raathigesh almost 2 years

    I have React js installed via NPM and using browserify to manage components in react. When an exception occurs in React, the console shows as

    "Uncaught Error: Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings."

    How do I enable full error messages ?