wonderful world
wonderful world

Reputation: 11599

Importing rxjs in an angular2 component gives error

In my angular2 component, I have

import * as Rx from '@reactivex/rxjs';

The Visual Studio complaints that 'Cannot find module @reactivex/rxjs'

I see that @reactivex\rxjs is installed under node_modules under angular2. The following is the folder structure.

node_modules\angular2\node_modules\@reactivex\rxjs

How can I fix so I can use Rx in the component?

UPDATE:

A similar issue from Github.

Upvotes: 3

Views: 1759

Answers (1)

Vivian
Vivian

Reputation: 138

Which version of alpha are you using? I am using Alpha-45 and the following works for me: import * as Rx from "@reactivex/rxjs/dist/cjs/Rx";

Upvotes: 2

Related Questions