Node_modules/rxjs/Rx"' has no exported member 'Rx'

18,736

Solution 1

its rxjs issue , i fixed it using npm install rxjs-compat

Solution 2

try with this:

import { BehaviorSubject } from 'rxjs/internal/BehaviorSubject';

Solution 3

Note: Rxjs does not have or export Rx

so, Import {Rx} from 'rxjs' will not work

If you want to import something specific like an Observable, you can do:

import { Observable } from 'rxjs';

Alternatively, you can import entire Rxjs and give it an alias of Rx as follows:

Import * as Rx from 'rxjs'

Solution 4

I had the same issue. I solved the issue by installing npm install rxjs.

Use import * as Rx from "rxjs"; instead of import * as Rx from "rxjs/Rx";. Just remove the Rx after the slash.

Share:
18,736

Related videos on Youtube

Sampath
Author by

Sampath

Angular, Ionic, Firestore, Typescript, PrimeNG Connect with ME : Twitter

Updated on June 22, 2022

Comments

  • Sampath
    Sampath almost 2 years

    Can you tell me why below behavior with rxjs/Rx? I'm using VS code V 1.14.1.

    This works:

    import * as Rx from 'rxjs/Rx';
    

    and

    import Rx from 'rxjs/Rx';
    

    But This is not working.

    import { Rx } from 'rxjs/Rx';
    

    node_modules/rxjs/Rx"' has no exported member 'Rx'.

    • Neil Lunn
      Neil Lunn almost 7 years
      Do import 'rxjs/add/operator/timer' then. Don't import ALL of the library namespace just to get a additional method.
  • Sampath
    Sampath almost 7 years
    If it doesn't have import member how this works import Rx from 'rxjs/Rx';? What are the other options to work this?