import {Observable} from "rxjs/Observable" doesn't work

Hello,

I have an angular application that has these two imports:

import { Subject } from ‘rxjs/Subject’;
import { Observable } from ‘rxjs/Observable’;

Both are underlined in red saying “Module ‘“c:/udemy/mean-course/mean-course/node_modules/rxjs/[Subject/Observable]”’ has no exported member ‘[Subject/Observable]’.”

When I look in c:/udemy/mean-course/mean-course/node_modules/rxjs/ I see:


Observable.d.ts
Observable.js
Observable.js.map

Subject.d.ts
Subject.js
Subject.js.map

In Observer.d.ts, it says:

export * from ‘rxjs-compat/Observable’;

In Observer.js, it says:

“use strict”;
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty§) exports[p] = m[p];
}
Object.defineProperty(exports, “__esModule”, { value: true });
__export(require(“rxjs-compat/Observable”));
//# sourceMappingURL=Observable.js.map

Subject.d.ts and Subject.js are similar.

Over in rxjs-compat, I get a similar redirecting to rxjs/internal/Observer, which again redirects me to ./types. I stopped jumping down the rabbit hole at that point.

What is going on here? I just want to use Subject and Observable. Where are they?!?! What npm package do I have to install and then how do I reference it? Thanks.

Facing same problem while working on “Blog Application”