0

Running Angular on my local PC and just running a basic ng build command.

When I run ng build everything works as expected.

When I try to run using my environment.dev.ts file by running ng build -c dev I get countless errors. Are these true errors? If so why do they only show in this instance?

Example of some of these errors:

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
R. Richards
  • 24,603
  • 10
  • 64
  • 64
user68288
  • 702
  • 2
  • 6
  • 27
  • Please, show your HTML-file and your TS-file of the `HeaderDialogComponent` in order to figure out what's going on. –  Apr 22 '21 at 21:33
  • Also, please post the angular version you are running and the architect section of your angular.json. I suspect this is an AOT error - and your local build is configured to run without AOT (so without typechecking the template), while your other configuration is configured to run with AOT (template is type checked). – pascalpuetz Apr 22 '21 at 21:36

0 Answers0