angular-cli - 当 ng build 运行良好时,为什么 ng build -c dev 会显示错误?
问题描述
在我的本地 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
解决方案
推荐阅读
- linux - 找到编号 X 下的编号子目录并删除它们
- node.js - 如何在 OpenShift 上将 MongoDB 从 3.2.10 升级到 3.6?
- android - 断管java.io.IOException:断管
- android - 如何从 Android 应用程序内部更改 Play 商店更新设置
- angular - @ngrx/entitiy 选择器在更改自定义状态时不会触发
- php - 无法获取注册表以将用户保存在数据库中
- vue.js - Vue - 如何搜索过滤数据中的特定部分?
- mysql - Mysql内部连接计数查询太慢
- swift - 如何在 Swift 4 中使用 SDWebImage 缓存从 firebase 存储中获取的图像数组?
- javascript - 溢出:在Firefox中隐藏不隐藏滚动条