gpt4 book ai didi

angular - 构建过程中来自 Terser 的运行时错误 --prod

转载 作者:太空狗 更新时间:2023-10-29 16:52:30 26 4
gpt4 key购买 nike

我已经更新了 Angular 的所有内容,现在当我
“构建——产品”

如果我删除 --prod 就没有错误

我在这个应用程序中没有真正的代码。它只是一个入门 shell。

关于要研究的内容有什么建议吗?

ERROR in runtime.82c6613acef8f7246fe8.js from Terser
TypeError: Cannot read property 'minify' of undefined
at minify (/Users/puser/Dropbox/AngularApps/GenesisFYI-v06/node_modules/terser-webpack-plugin/dist/minify.js:175:23)
at module.exports (/Users/puser/Dropbox/AngularApps/GenesisFYI-v06/node_modules/terser-webpack-plugin/dist/worker.js:13:40)
at handle (/Users/puser/Dropbox/AngularApps/GenesisFYI-v06/node_modules/worker-farm/lib/child/index.js:44:8)
at process.<anonymous> (/Users/puser/Dropbox/AngularApps/GenesisFYI-v06/node_modules/worker-farm/lib/child/index.js:51:3)
at process.emit (events.js:197:13)
at emit (internal/child_process.js:828:12)
at processTicksAndRejections (internal/process/next_tick.js:76:17)

我的当前版本

Angular CLI: 7.3.0  
Node: 11.8.0
OS: darwin x64
Angular: 7.2.3
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router, service-worker

Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.13.0
@angular-devkit/build-angular 0.13.0
@angular-devkit/build-optimizer 0.13.0
@angular-devkit/build-webpack 0.13.0
@angular-devkit/core 0.6.8
@angular-devkit/schematics 0.6.8
@angular/cli 7.3.0
@angular/pwa 0.6.8
@ngtools/webpack 7.3.0
@schematics/angular 0.6.8
@schematics/update 0.13.0
rxjs 6.4.0
typescript 3.2.4
webpack 4.29.0

最佳答案

最近发布的 Terser 3.16 版本似乎有问题,here's Terser 和 Terser as a Webpack plugin 中的相关问题.

this VueJS issue他们建议将其降级到版本 3.14.1。您可以在 package.json 中查找包含 "terser" 和 pin 的行它如下:

    "terser": "3.14.1",

关于angular - 构建过程中来自 Terser 的运行时错误 --prod,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54497782/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com