Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular js 2 'node_modules/rxjs/Observable"' has no exported member 'Observable'. import Observable

Tags:

angular

I am Getting below Error in Auth.d.ts file in Node_Modules Package.

[ts] Module 'node_modules/rxjs/Observable"' has no exported member 'Observable'. import Observable

Find the below code for Auth.d.ts file :

import * as firebase from 'firebase/app';
import 'firebase/auth';

import { Observable } from 'rxjs/Observable';
import { FirebaseApp } from '../app/index';
export declare class AngularFireAuth {
    app: FirebaseApp;
    auth: firebase.auth.Auth;
    authState: Observable<firebase.User>;
    idToken: Observable<firebase.User>;
    constructor(app: FirebaseApp);
}
export declare function FirebaseAuthStateObservable(app: FirebaseApp): Observable<firebase.User>;
export declare function FirebaseIdTokenObservable(app: FirebaseApp): Observable<firebase.User>;

I installed "npm install @reactivex/rxjs" this package also even then I am getting above error

like image 896
sundeep Avatar asked May 05 '18 10:05

sundeep


2 Answers

Try changing it to:

import { Observable } from 'rxjs';
like image 176
Arman Fatahi Avatar answered Oct 23 '22 08:10

Arman Fatahi


Try npm install rxjs-compat or yarn add rxjs-compat.

It's works for me.

like image 12
CaptainNemo Avatar answered Oct 23 '22 10:10

CaptainNemo