I extracted sample template code from this tutorial and did below two steps to get started -
npm install // worked fine and created node_modules folder
You can temporarily work around the issue by using Module Augmentation
The following code resolved the issue for me. Once RxJS has a stable release that does not exhibit this issue, it should be removed.
// augmentations.ts
import {Operator} from 'rxjs/Operator';
import {Observable} from 'rxjs/Observable';
// TODO: Remove this when a stable release of RxJS without the bug is available.
declare module 'rxjs/Subject' {
interface Subject {
lift(operator: Operator): Observable;
}
}
While it is perhaps ironic that RxJS itself makes such heavy use of this technique to describe its own shape, it is actually generally applicable to an array of problems.
While there are certainly limits and rough edges, part of what makes this technique powerful is that we can use it to enhance existing declarations making them more type safe without forking and maintain the entire file.