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

后端 未结 7 1462
渐次进展
渐次进展 2021-02-07 22:48

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 Observab

相关标签:
7条回答
  • 2021-02-07 22:56
    import { Observable } from 'rxjs';
    

    and install

    npm i rxjs-compat
    
    0 讨论(0)
  • 2021-02-07 23:01

    Try changing it to:

    import { Observable } from 'rxjs';
    
    0 讨论(0)
  • 2021-02-07 23:07

    You have to downgrade 'rxjs' to use the current 'firebase' package.

    The imports changed in new versions of 'rxjs', and firebase is compatible only with version 5.x.x of RxJs for now.

    Change your package.json file to use a compatible version of rxjs:

    "rxjs": "5.6.0-forward-compat.4"
    

    and re-run npm install:

    npm i

    0 讨论(0)
  • 2021-02-07 23:09

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

    It's works for me.

    0 讨论(0)
  • 2021-02-07 23:12

    npm i rxjs-compat

    Please add these in root folder

    surely your issue will be resolve

    0 讨论(0)
  • 2021-02-07 23:16

    If you are using angular version 6 then You can use

    // creation and utility methods

    import { Observable, Subject, pipe } from 'rxjs';
    

    // operators all come from rxjs/operators

    import { map, takeUntil, tap } from 'rxjs/operators';
    
    0 讨论(0)
提交回复
热议问题