Angular 生产构建错误为什​​么我得到 ./src/app/app.module.ngfactory.js

Angular production build error why I am getting ./src/app/app.module.ngfactory.js

当我尝试构建 ng serve --prod 时, 我在下面收到一些错误: $ ng build --prod 错误

./src/app/app.module.ngfactory.js 中出错 找不到模块:错误:无法解析 'C:\Users\MadOrWat\Desktop\gsipKOtakUI\pro\sameProdGsip\src\app'

中的 'ngx-bootstrap/dropdown/bs-dropdown.module'

以下是我当前应用的版本

而且我正在尝试使用 ng add @angular/pwa --project app

我遇到了其他问题 超出最大调用堆栈大小

ngx-bootstrap github 存储库中找到了这个 issue

ngx bootstrap error with Angular -v6.0.0 and rxjs -v6.0.0

里面有句有趣的 comment 话:

rxjs v6 has several breaking changes including simplifying import points for operators. Try installing rxjs-compat, which adds back those import paths until the code has been migrated.

试试吧,希望对你有帮助。

rxjs 上的 ngx-bootstrap 桥面临一些问题。您必须尝试对 bootstrap 进行显式 npm 安装,最好是 stable/latest 版本,它应该可以正常工作。

我做了以下操作,效果很好:

npm install ngx-bootstrap@3.0.1 

一切顺利, 哈里