简体   繁体   中英

react-redux - ReferenceError: g is not defined

I found this problem when was building javascript files for production and I test the Website again. In the development environment I can not reproduce. I am using react and react-redux on my SinglePageApplication, npm and gulp building tool.

package.json:

"react": "~16.0.0",
"react-chartjs-2": "^2.6.4",
"react-dom": "~16.0.0",
"react-dropzone": "^4.1.3",
"react-popper": "^0.7.3",
"react-redux": "~4.4.0",

versions

react -v : 16.3.0
react-redux -v : 4.4.9

Gulp command

npm -i
gulp production

I got an error message from the browser:

react-redux.min.js? 3b99:1 Uncaught     

ReferenceError: g is not defined
        at a (react-redux.min.js?3b99:1)
        at a (react-redux.min.js?3b99:1)
        at react-redux.min.js?3b99:1

I got 2 days ago same problem in my project without touching the code only build the code. Is a general problem issue in the minifier react-redux.min for version 4.4.9 ; I suggest to put in the package.json a fix version for react-redux : '4.4.8'

There is a issue ticket with this problem but they closed it, I hope they will reopen and try to fix for the version 4.4.9 https://github.com/reactjs/react-redux/issues/904

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM