2017-06-02 70 views
0

突然地,angular-cli「npm run build」引發錯誤。無法設置未定義的webpack.js屬性「固定」

ERROR從UglifyJs 類型錯誤main.fd5c1ee90c2680e9dd0f.bundle.js:從UglifyJs 類型錯誤在main.6ff207bed7a4c7f21b38.bundle.js不確定

錯誤的「固定」無法設置屬性:無法設置屬性「固定」 (D:\ project \ Desktop \ Hotfix \ 3 \ node_modules \ webpack \ node_modules \ uglify -js \ tools \ node.js:1:0)中的未定義 ,:5581: (D:\ project \ Desktop \ Hotfix \ 3 \ node_modules \ webpack \ node_modules \ uglify-js \ tools \ node.js:1:0),:1339:24) at(在Object._visit(eval at 25)) at AST_Node._walk(eval at(D:\ project \ Desktop \ Hotfix \ 3 \ node_modules \ webpack \ node_modules \ uglify-js \ tool (D:\ project \ Desktop \ Hotfix \ 3 \ node_modules \ webpack \ node_modules \ uglify -js \ tools \ node下的eval)。 (D:\ project \ Desktop \ Hotfix \ 3 \ node_modules \ webpack \ node_modules \ uglify -js \ tools \ node.js:1:js:1:0),:1061:29) (在D:\ project \ Desktop \ Hotfix \ 3 \ node_modules \ webpack \ node_modules \ uglify-js \ tools \ node.js:1:0)處的eval,::1343:21) at AST_Node._walk (D:\ project \ Desktop \ Hotfix \ 3 \ node_modules \ webpack \ node_modules \ uglify-js \ tools \ node.js:1:0),:483:21)在AST_Node.walk(eval) (D:\ project \ Desktop \ Hotfix \ 3 \ node_modules \ webpack \ node_modules \ uglify-js \ tools \ node.js:1:0),:5719:31)的Object.eval [as visit] (在D:\ project \ Desktop \ Hotfix \ 3 \ node_modules \ webpack \ node_modules \ uglify-js \ tools \ node.js:1:0)處的eval處, (D:\ project \ Desktop \ Hotfix \ 3 \ node_modules \ webpack \ node_modules \ uglify -js \ tools \ node.js:1:0),:653:24)在AST_Node._walk(eval at 9:24) (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 (E:\ project \ Desktop \ Hotfix \ 3 \ node_modules \ webpack \ node_modules \ uglify -js \ tools \ node.js:1:0),:1343:21) at AST_Node._walk (D:\ project \ Desktop \ Hotfix \ Desktop \ Hotfix \ 3 \ node_modules \ webpack \ node_modules \ uglify -js \ tools \ node.js:1:0),:540:24) at AST_Node.walk 3 \ node_modules \ webpack \ node_modules \ uglify-js \ tools \ node.js:1:0),:483:21)(在D:\ project \ Desktop \ Hotfix \ 3 \ node_modules \ webpack \ node_modules \ uglify-js \ tools \ node.js:1:0),:5698:42)處訪問Object.eval [

這是工作與以往node_modules文件夾,現在它不工作

回答

0

參考在這個問題上的意見。 Angular build failing due to Uglify.js

所有依賴關係排列的方式都是一個問題。在依賴關係流程中存在不匹配,並且子依賴關係打破了整個流程。所以我更新了項目使用的角度版本,然後繞過了生成一個新項目。比較舊的和新的項目的Package.json。之後,它需要一些調整,然後開始工作。在上面的鏈接中還可以找到其他有趣的點。

相關問題