0
votes

Suddenly angular-cli "npm run build" is throwing error.

ERROR in main.fd5c1ee90c2680e9dd0f.bundle.js from UglifyJs TypeError: Cannot set property 'fixed' of undefined

ERROR in main.6ff207bed7a4c7f21b38.bundle.js from UglifyJs TypeError: Cannot set property 'fixed' of undefined at Object.eval [as visit] (eval at (D:\project\Desktop\Hotfix\3\node_modules\webpack\node_modules\uglify-js\tools\node.js:1:0), :5581:25) at Object._visit (eval at (D:\project\Desktop\Hotfix\3\node_modules\webpack\node_modules\uglify-js\tools\node.js:1:0), :1339:24) at AST_Node._walk (eval at (D:\project\Desktop\Hotfix\3\node_modules\webpack\node_modules\uglify-js\tools\node.js:1:0), :480:24) at AST_Node.eval (eval at (D:\project\Desktop\Hotfix\3\node_modules\webpack\node_modules\uglify-js\tools\node.js:1:0), :1061:29) at Object._visit (eval at (D:\project\Desktop\Hotfix\3\node_modules\webpack\node_modules\uglify-js\tools\node.js:1:0), :1343:21) at AST_Node._walk (eval at (D:\project\Desktop\Hotfix\3\node_modules\webpack\node_modules\uglify-js\tools\node.js:1:0), :1060:24) at AST_Node.walk (eval at (D:\project\Desktop\Hotfix\3\node_modules\webpack\node_modules\uglify-js\tools\node.js:1:0), :483:21) at Object.eval [as visit] (eval at (D:\project\Desktop\Hotfix\3\node_modules\webpack\node_modules\uglify-js\tools\node.js:1:0), :5719:31) at Object._visit (eval at (D:\project\Desktop\Hotfix\3\node_modules\webpack\node_modules\uglify-js\tools\node.js:1:0), :1339:24) at AST_Node._walk (eval at (D:\project\Desktop\Hotfix\3\node_modules\webpack\node_modules\uglify-js\tools\node.js:1:0), :653:24) at walk_body (eval at (D:\project\Desktop\Hotfix\3\node_modules\webpack\node_modules\uglify-js\tools\node.js:1:0), :530:17) at AST_Node.eval (eval at (D:\project\Desktop\Hotfix\3\node_modules\webpack\node_modules\uglify-js\tools\node.js:1:0), :541:13) at Object._visit (eval at (D:\project\Desktop\Hotfix\3\node_modules\webpack\node_modules\uglify-js\tools\node.js:1:0), :1343:21) at AST_Node._walk (eval at (D:\project\Desktop\Hotfix\3\node_modules\webpack\node_modules\uglify-js\tools\node.js:1:0), :540:24) at AST_Node.walk (eval at (D:\project\Desktop\Hotfix\3\node_modules\webpack\node_modules\uglify-js\tools\node.js:1:0), :483:21) at Object.eval [as visit] (eval at (D:\project\Desktop\Hotfix\3\node_modules\webpack\node_modules\uglify-js\tools\node.js:1:0), :5698:42)

This is working with previous node_modules folder, now it is not working

1

1 Answers

0
votes

Refer to the comments in this question. Angular build failing due to Uglify.js

The way in which all the dependencies were arranged was an issue. There was a mismatch in the dependency flow and the sub dependencies were breaking the whole stuff. So I updated to the version of the angular that the project was using and then went around generating a new project. Compared the Package.json from the old and the new project. After that it required some adjustments and then the thing started working. There are other interesting points that you might find in the above link.