find and solve || findandsolve.com
Please wait.....

Cannot find module rxjs-compat/Observable

I am currently upgrading angular 9.0.7 to angular 11.2.5 code. I have installed "rxjs": "xxx" and un-installed rxjs-compact as I have migrated the code to use the new rxjs operators.

Your global Angular CLI version (11.2.5) is greater than your local version (9.0.7). The local Angular CLI version is used.

To disable this warning use "ng config -g cli.warnings.versionMismatch false".

ERROR in node_modules/rxjs/Observable.d.ts:1:15 - error TS2307: Cannot find module 'rxjs-compat/Observable'

This types of error has been occured.


Answer


Option 1.

I have soved this error by.

npm install --save rxjs-compat 

and 

import { Observable } from 'rxjs/Observable';


Option 2.

Just open command prompt & add below command in to your root folder.

npm i rxjs-compat

and

import { Observable } from 'rxjs/Observable';


Option 3.

it's simple do this  only replacing 'rxjs/Subscription' with 'rxjs'


Mahira  khanna

Mahira khanna

I have the skills you need for you company blog, website, or other content materials

If findandsolve.com felt valuable to you, feel free to share it.

Comments



Report Response