I've tried installing rxjs with "npm install rxjs" but it still can't find the module after installing. I've tried installing "npm install --save rxjs-compat" as well as reinstalling and uninstalling the modules, but it still doesn't work. Thanks a lot for the help in advance!
Here's the version I'm using from the package.json file: ""rxjs": "^7.4.0","
CodePudding user response:
Reference: https://rxjs.dev/guide/observable
import { Observable } from 'rxjs';
CodePudding user response:
Try this:
npm install --save rxjs-compat
CodePudding user response:
Have you tried it this way - import * as Rx from 'rxjs'; Or it might be something with your compilerOptions in your tsconfig file. I'm looking at similar issues here and here
CodePudding user response:
Maybe you don't have some types needed.
To install all Module Types (CJS/ES6/AMD/TypeScript) via npm:
- To install this library via npm version 3, use the following command:
npm install @reactivex/rxjs
- If you are using npm version 2 before this library has achieved a stable version, you need to specify the library version explicitly:
npm install @reactivex/[email protected]
From official documentation HERE