I'm using a custom version of the angular project source.lift is not a function
when the http get call is made. The error is in core.js
file.
How to fix this issue?
We had the same issue as well. In the end it turned out to be an issue with mismatched brackets. We used the switchMap operator and the catcherror operator. But because we had the brackets wrong. The catcherror operator was taken as the second parameter of the switchMap (the result selector) funnily enough, this still compiled though. So please double check your brackets.
Got same problems. catchError should not be in tap brackets.
Wrong: catchError called in tap
getHeroes() : Observable<Hero[]> {
return this.http.get<Hero[]>(this.heroesUrl)
.pipe(tap(_ => console.log('Fetching heroes'),
catchError(this.handleError('getting heroes', [])) ))
}
Correct is: (catchError not in tap)
getHeroes() : Observable<Hero[]> {
return this.http.get<Hero[]>(this.heroesUrl)
.pipe(tap(_ => console.log('Fetching heroes')),
catchError(this.handleError('getting heroes', []) ))
}
I had the same error in my web app, i didn't get it fixed until i realized to test upgrading the rxjs version, since i had it at 6.0.0, changing it to the last at this moment, version 6.3.2 fixed my problem. In conclusion is a bug from first version of rxjs, we should test it a little more, but so far so good. Hope this helps you.
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