无法设置undefined webpack.js

时间:2017-06-02 10:35:45

标签: angular-cli uglifyjs

突然,angular-cli“npm run build”正在抛出错误。

来自UglifyJs的main.fd5c1ee90c2680e9dd0f.bundle.js中的错误 TypeError:无法设置未定义的属性“fixed”

来自UglifyJs的main.6ff207bed7a4c7f21b38.bundle.js中的错误 TypeError:无法设置undefined的属性'fixed'     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)     在Object._visit(eval at(D:\ project \ Desktop \ Hotfix \ 3 \ node_modules \ webpack \ node_modules \ uglify-js \ tools \ node.js:1:0),:1339:24)     在AST_Node._walk(eval at(D:\ project \ Desktop \ Hotfix \ 3 \ node_modules \ webpack \ node_modules \ uglify-js \ tools \ node.js:1:0),:480:24)     在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)     在AST_Node._walk(eval at(D:\ project \ Desktop \ Hotfix \ 3 \ node_modules \ webpack \ node_modules \ uglify-js \ tools \ node.js:1:0),:1060:24)     在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)     在Object._visit(eval at(D:\ project \ Desktop \ Hotfix \ 3 \ node_modules \ webpack \ node_modules \ uglify-js \ tools \ node.js:1:0),:1339:24)     在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)     在AST_Node._walk(eval at(D:\ project \ Desktop \ Hotfix \ 3 \ node_modules \ webpack \ node_modules \ uglify-js \ tools \ node.js:1:0),:540:24)     在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)< / p>

这适用于以前的node_modules文件夹,现在它无法正常工作

1 个答案:

答案 0 :(得分:0)

请参阅此问题中的评论。 Angular build failing due to Uglify.js

所有依赖项的排列方式都是一个问题。依赖流中存在不匹配,子依赖关系破坏了整个内容。所以我更新了项目正在使用的角度版本,然后开始生成一个新项目。比较旧项目和新项目中的Package.json。之后,它需要一些调整,然后事情开始工作。您可以在上面的链接中找到其他有趣的观点。