Gutenberg: React.js is loaded in production mode, making React dev throw "Minified React error #130"

Created on 10 Sep 2018  路  3Comments  路  Source: WordPress/gutenberg

I'm not totally sure what the right path forward here is, so my apologies if this is wrong place to ask for clarification.

I'm doing development with React.js in my own plugin, but I am not running Gutenberg in development mode, nor am I even pulling it from Github. Therefore, I believe Gutenberg assumes it is in production mode, and thus, loads the minified version of ReactJS.

However, in my own plugin, I am enqueueing React using wp_enqueue_script, and I am unable to get Javascript error messages in my console, with all errors outputting a generic message, which is "Minified React error #130".

If I uninstall Gutenberg, everything is fine, and I get full Javascript errors in the console, allowing me to do development work on the plugins I am working on.

Is there a way to put Gutenberg into development mode without needing to pull it from Github and run npm (which fails for me currently)?

[Type] Help Request

Most helpful comment

Setting SCRIPT_DEBUG to true isn't working on WordPress 5.0

All 3 comments

Try setting SCRIPT_DEBUG to true in your local install, it should load an unminified version of React.

Yep that did it. Thanks @youknowriad. Totally slipped my mind (new dev environment).

Setting SCRIPT_DEBUG to true isn't working on WordPress 5.0

Was this page helpful?
0 / 5 - 0 ratings

Related issues

BE-Webdesign picture BE-Webdesign  路  3Comments

maddisondesigns picture maddisondesigns  路  3Comments

youknowriad picture youknowriad  路  3Comments

davidsword picture davidsword  路  3Comments

jasmussen picture jasmussen  路  3Comments