Search code examples
angularrxjsrxjs-observables

Angular error TS2305: Module '"rxjs"' has no exported member 'tap'


I'm adding RxJS into Angular app. After installing RxJS, I got errors: error TS2305: Module '"rxjs"' has no exported member 'tap'.

for the line of code:

import { catchError, tap } from "rxjs"

After running >npm start I'm getting list of errors: enter image description here

I tried to install RxJS below, it didn't help.

npm install rxjs npm i rxjs-compat

Application located here: github.com/sam-klok/angular-kendo-grid-reactive

PS Some people suggesting similarity with Angular - "has no exported member 'Observable'" I believe that it's overall useful article, however in my case library Observable working fine, and fixing methods described in it, didn't help to solve the issue.


Solution

  • I looked at the code of the application and see that it use Angular 12 and older version of RxJS (see screen of package.json below). And tap.ts file is "almost" empty, which tells me that something is with versions incompatibility. Currently I'm upgrading everything to Angular 13, and newer version of RxJS, will report later if it is a solution.

    Basically solution was to upgrade version of Angular in this project. enter image description here

    enter image description here