I am new to angular and started to build an application with Angular 7 and angular-material. ng serve and ng build work well. But when I start ng build --prod it gives me the below error.
Thanks for any response. Any ides will be highly appreciated.
package.json
"dependencies": {
"@angular/animations": "^7.1.0",
"@angular/cdk": "^7.1.0",
"@angular/common": "~7.1.0",
"@angular/compiler": "~7.1.0",
"@angular/core": "~7.1.0",
"@angular/forms": "~7.1.0",
"@angular/material": "^7.1.0",
"@angular/platform-browser": "~7.1.0",
"@angular/platform-browser-dynamic": "~7.1.0",
"@angular/router": "~7.1.0",
"angular-hammer": "^2.2.0",
"core-js": "^2.5.4",
"font-awesome": "^4.7.0",
"jquery": "^3.3.1",
"rxjs": "~6.3.3",
"tslib": "^1.9.0",
"zone.js": "~0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.11.0",
"@angular/cli": "~7.1.0",
"@angular/compiler-cli": "~7.1.0",
"@angular/language-service": "~7.1.0",
"@types/node": "~8.9.4",
"@types/jasmine": "~2.8.8",
"@types/jasminewd2": "~2.0.3",
"codelyzer": "~4.5.0",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~3.1.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.4.0",
"ts-node": "~7.0.0",
"tslint": "~5.11.0",
"typescript": "~3.1.6"
imports: [
BrowserModule,
AppRoutingModule,
ReactiveFormsModule,
HttpClientModule,
MatDialogModule,
MatChipsModule,
BrowserAnimationsModule,
MatTooltipModule,
MatDialogModule,
MatSelectModule,
MatBadgeModule,
MatButtonToggleModule,
MatSlideToggleModule,
MatTableModule,
MatExpansionModule,
MatDividerModule
],
providers: [fakeBackendProvider,
// { provide: HTTP_INTERCEPTORS, useClass: JwtInterceptor, multi: true },
// { provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptor, multi: true }
],
bootstrap: [AppComponent],
entryComponents: [SonderdetailsComponent, UmlaufdetailsComponent]
I get following error:
ERROR in Error during template compile of 'MatDialogContainer'
Function calls are not supported in decorators but 'trigger' was called in 'matDialogAnimations'
'matDialogAnimations' calls 'trigger' at
@angular\material\dialog\typings\index.ts(38,20)
Still dont know the answer, but i tried the same at a different computer. The second one was not behind a proxy and the build succeded. So it deffinetly has something to do with the proxy. But as long as I can build my project, this problem is not so important anymore.
Thanks for the responses.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With