Yes
5.3.0
I searched for TypeError: Cannot read property 'reset' of undefined
node -v: v6.10.0npm -v: 5.3.0yarn --version (if you use Yarn):npm ls react-scripts (if you haven’t ejected): [email protected]Then, specify:
(Write your steps here:)
npm run build which I used to create a deployable build. It used to work fine with react-scripts 1.0.6 Now with the latest react-scripts, I get the following error:➜ frontend-web git:(master) npm run build
> [email protected] build /Users/psankar/go/src/gitlab.com/kaigal/kaigal/frontend-web
> react-scripts build
Creating an optimized production build...
Failed to compile.
Failed to minify the bundle. Error: static/js/main.d0e43aae.js from UglifyJs
TypeError: Cannot read property 'reset' of undefined
at Array.forEach (native)
at compiler.run (/Users/psankar/go/src/gitlab.com/kaigal/kaigal/frontend-web/node_modules/react-scripts/scripts/build.js:130:23)
at emitRecords.err (/Users/psankar/go/src/gitlab.com/kaigal/kaigal/frontend-web/node_modules/webpack/lib/Compiler.js:269:13)
at Compiler.emitRecords (/Users/psankar/go/src/gitlab.com/kaigal/kaigal/frontend-web/node_modules/webpack/lib/Compiler.js:375:38)
at emitAssets.err (/Users/psankar/go/src/gitlab.com/kaigal/kaigal/frontend-web/node_modules/webpack/lib/Compiler.js:262:10)
at applyPluginsAsyncSeries1.err (/Users/psankar/go/src/gitlab.com/kaigal/kaigal/frontend-web/node_modules/webpack/lib/Compiler.js:368:12)
at next (/Users/psankar/go/src/gitlab.com/kaigal/kaigal/frontend-web/node_modules/tapable/lib/Tapable.js:218:11)
at Compiler.compiler.plugin (/Users/psankar/go/src/gitlab.com/kaigal/kaigal/frontend-web/node_modules/webpack/lib/performance/SizeLimitsPlugin.js:99:4)
at next (/Users/psankar/go/src/gitlab.com/kaigal/kaigal/frontend-web/node_modules/tapable/lib/Tapable.js:220:14)
at /Users/psankar/go/src/gitlab.com/kaigal/kaigal/frontend-web/node_modules/sw-precache-webpack-plugin/lib/index.js:98:18
Read more here: http://bit.ly/2tRViJ9
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/psankar/.npm/_logs/2017-08-17T10_36_16_498Z-debug.log
➜ frontend-web git:(master)
Build happens cleanly
The above error was shown.
(Paste the link to an example project and exact instructions to reproduce the issue.)
Please provide a minimal project reproducing this.
After a bit more of googling, I did a rm -rf node_modules and reinstalled all the dependencies once again and everything works fine now. I will close the bug. Thanks.
Duplicate issue: https://github.com/facebookincubator/create-react-app/issues/2953
This has something to do with _uglifyjs-webpack-plugin_ plugin
Most helpful comment
After a bit more of googling, I did a
rm -rf node_modulesand reinstalled all the dependencies once again and everything works fine now. I will close the bug. Thanks.