为什么 ng build -c dev 在 ng build 运行良好时会显示错误?

问题描述

在我的本地 PC 上运行 Angular 并且只运行一个基本的 ng build 命令。

当我运行 ng build 时,一切都按预期工作。

当我尝试通过运行 ng build -c dev 使用我的 environment.dev.ts 文件运行时,我遇到了无数错误。这些是真正的错误吗?如果是这样,为什么它们只在这种情况下显示

其中一些错误的示例:

ERROR in src\app\main\header-dialog\header-dialog.component.html(66,21): : Property 'primary' does not exist on type 'HeaderDialogComponent'.
src\app\main\header-dialog\header-dialog.component.html(67,21): : Property 'determinate' does not exist on type 'HeaderDialogComponent'.
src\app\main\header-dialog\header-dialog.component.html(168,19): : Property 'primary' does not exist on type 'HeaderDialogComponent'.
src\app\main\header-dialog\header-dialog.component.html(169,19): : Property 'determinate' does not exist on type 'HeaderDialogComponent'.
src\app\main\header-dialog\header-dialog.component.html(246,19): : Property 'primary' does not exist on type 'HeaderDialogComponent'.
src\app\main\header-dialog\header-dialog.component.html(247,19): : Property 'determinate' does not exist on type 'HeaderDialogComponent'.
node_modules\@ng-bootstrap\ng-bootstrap\datepicker\datepicker-navigation.d.ts.NgbDatepickerNavigation.html(3,67): : An expression of type 'void' cannot be tested for truthiness
node_modules\@ng-bootstrap\ng-bootstrap\datepicker\datepicker-navigation.d.ts.NgbDatepickerNavigation.html(25,67): : An expression of type 'void' cannot be tested for truthiness

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)