I have upgraded my Angular 5 app to 6.0.1 and RxJs to 6.1.0.
In one of my services, I have the import below:
import { ErrorObservable } from 'rxjs/observable/ErrorObservable';
However, I now get the following error:
Module '"...node_modules/rxjs/observable/ErrorObservable"' has no exported member 'ErrorObservable'.
I have search online for how to import this in rxjs6 or if the name
ErrorObservable
has changed.
I used this as my guide for the upgrade process:
Does anyone know how to resolve this import?
import { Observable, throwError } from 'rxjs';
// import { ErrorObservable } from 'rxjs/observable/ErrorObservable';
Thank you everyone! The above is the answer with the old line commented out.
Usage:
return throwError('some message');