I am trying to build the production version of my Angular 8 app, but I'm constantly getting Property '*' does not exist on type '*'
errors.
Executed command:
ng build --prod="true" --verbose=true
Received errors:
ERROR in src/app/shared/layout/sidenav/sidenav.component.html(1,46): : Property 'always' does not exist on type 'SidenavComponent'.
src/app/shared/layout/sidenav/sidenav.component.html(1,97): : Property 'scrollViewExtras' does not exist on type 'SidenavComponent'.
src/app/shared/layout/sidenav/sidenav.component.html(1,128): : Property 'scrollBarExtras' does not exist on type 'SidenavComponent'.
src/app/shared/layout/sidenav/sidenav.component.html(10,41): : Property 'sidenav' is private and only accessible within class 'SidenavComponent'.
These are the first 3 rows of src/app/shared/layout/sidenav/sidenav.component.html
:
<ng-scrollbar class="notice-board-scrollbar" [shown]="always" [compact]="true" [invertY]="true" [viewClass]="scrollViewExtras" [barClass]="scrollBarExtras">
<cdk-virtual-scroll-viewport ngScrollbarView smoothScroll itemSize="100">
<mat-list role="list">
If I build without the --prod="true"
flag or I execute ng serve
, it compiles without errors.
riverman@vscode:~/projects/front$ ng version
Angular CLI: 8.0.3
Node: 10.16.1
OS: linux x64
Angular: 8.0.2
... animations, cdk, common, compiler, compiler-cli, core
... elements, forms, language-service, platform-browser
Package Version
-------------------------------------------------------------
@angular-devkit/architect 0.800.3
@angular-devkit/build-angular 0.800.3
@angular-devkit/build-optimizer 0.800.3
@angular-devkit/build-webpack 0.800.3
@angular-devkit/core 8.0.1
@angular-devkit/schematics 8.0.3
@angular/cli 8.0.3
@angular/material 8.0.1
@angular/platform-browser-dynamic 8.0.1
@angular/router 8.0.1
@ngtools/webpack 8.0.3
@schematics/angular 8.0.3
@schematics/update 0.800.3
rxjs 6.5.2
typescript 3.4.5
webpack 4.30.0
Thanks for any help in advance!