Error : Module ‘”@angular/material”‘ has no exported member “…”

You have probably updated your angular and/or angular material versions; with the angular material 9 upgrade they changed the imports from @angular/material notation to @angular/material/button like notation. Instead of importing from @angular/material, you should import deeply from the specific component. E.g. @angular/material/button. ng update will do this automatically for you. You can follow the upgrade … Read more

throwError(error) is now deprecated, but there is no new Error(HttpErrorResponse)

Instead of this: catchError((error) => { this.authService.signOut(); return throwError(error); }), You could try this: catchError((error) => { this.authService.signOut(); return throwError(() => error); }), I wasn’t able to test it thoroughly, but a simple attempt seemed to work. This was my simple test (using RxJS v7.2): Service getProducts(): Observable<IProduct[]> { return this.http.get<IProduct[]>(this.productUrl) .pipe( tap(data => console.log(‘All: … Read more

Angular 12 source map is missing in browser

Angular 12 changed the default “ng build” to use the “production” configuration. You want “sourceMap” so try adding a “development” config in your angular.json like this “development”: { “buildOptimizer”: false, “optimization”: false, “vendorChunk”: true, “extractLicenses”: false, “sourceMap”: true, “namedChunks”: true } Target with either “ng build -c development”, or change your default configuration for “ng … Read more

Angular 12 ‘ng serve’ builds apps slowly, almost like production builds

The angular cli got updated with v12 to have the development environment be more like production. Or as they like to call it: The aim of these changes is to reduce the configuration complexity and support the new “production builds by default” initiative. Judging by what they’ve changed, you should update your angular.json and update … Read more