Signup/Sign In
Ask Question
Not satisfied by the Answer? Still looking for a better solution?

Property 'map' does not exist on type 'Observable<Response>'

I am trying to call an API from Angular but am getting this error:

Property 'map' does not exist on type 'Observable<Response>'

The answers from this similar question didn't solve my issue: Angular 2 beta.17: Property 'map' does not exist on type 'Observable<Response>'.

I am using Angular 2.0.0-beta.17.
by

2 Answers

rahul07
Just write this command in the VS Code terminal of your project and restart the project.

npm install rxjs-compat

You need to import the map operator by adding this:

import 'rxjs/add/operator/map';
kshitijrana14
Simply install rxjs-compat to solve the problem
npm i rxjs-compat --save-dev

And import it like below
import 'rxjs/Rx';

Login / Signup to Answer the Question.