Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't resolve 'rxjs/add/operator/do'

Tags:

angular6

I have created an Angular component in which I am importing rxjs do operator.

But getting error cant resolve.

ERROR in ./src/app/Members/member-messages/member-messages.component.ts
Module not found: Error: Can't resolve 'rxjs/add/operator/do' in 'C:\Demo\DatingApDemo\DatingApp\src\app\Members\member-messages'

What is the solution for this?

Thank you, Sharayu

like image 836
Sharayu Nalvade Avatar asked Jun 30 '18 07:06

Sharayu Nalvade


1 Answers

Finally, I am able to solve that issue.

do() is replaced by tap().

for reference https://www.academind.com/learn/javascript/rxjs-6-what-changed/

and tap() should be inside .pipe().

like this, .pipe(tap())

for more reference, you can refer this link,

https://alligator.io/angular/angular-6/

and

https://www.learnrxjs.io/operators/utility/do.html

like image 169
Sharayu Nalvade Avatar answered Nov 18 '22 10:11

Sharayu Nalvade