React build failed to minify the bundle. error from UglifyJs

Viewed 1367

My react app has randomly stopped working when i try and do a build with:

npm run-script build

The error is:

Failed to minify the bundle. Error: static/js/main.4f3a37aa.js from UglifyJs RangeError: Maximum call stack size exceeded at Array.push () at C:\Mist_Applications_Ltd\ASIRTAPORTAL\ASIRTAPORTAL\ClientApp\scripts\build.js:120:23 at C:\Mist_Applications_Ltd\ASIRTAPORTAL\ASIRTAPORTAL\ClientApp\node_modules\webpack\lib\Compiler.js:269:13 at Compiler.emitRecords (C:\Mist_Applications_Ltd\ASIRTAPORTAL\ASIRTAPORTAL\ClientApp\node_modules\webpack\lib\Compiler.js:375:38) at C:\Mist_Applications_Ltd\ASIRTAPORTAL\ASIRTAPORTAL\ClientApp\node_modules\webpack\lib\Compiler.js:262:10 at C:\Mist_Applications_Ltd\ASIRTAPORTAL\ASIRTAPORTAL\ClientApp\node_modules\webpack\lib\Compiler.js:368:12 at next (C:\Mist_Applications_Ltd\ASIRTAPORTAL\ASIRTAPORTAL\ClientApp\node_modules\tapable\lib\Tapable.js:218:11) at Compiler. (C:\Mist_Applications_Ltd\ASIRTAPORTAL\ASIRTAPORTAL\ClientApp\node_modules\webpack\lib\performance\SizeLimitsPlugin.js:99:4) at next (C:\Mist_Applications_Ltd\ASIRTAPORTAL\ASIRTAPORTAL\ClientApp\node_modules\tapable\lib\Tapable.js:220:14) at C:\Mist_Applications_Ltd\ASIRTAPORTAL\ASIRTAPORTAL\ClientApp\node_modules\sw-precache-webpack-plugin\lib\index.js:98:18

The webpack section of my package json looks like this:

image

I have tried so much stuff and just dont understand why things have suddenly stoped working!

0 Answers
Related