Fixing: Can’t resolve ‘rxjs/add/operator/map’ error

We recently got the error Can't resolve 'rxjs/add/operator/map' after upgrading Angular v5 to v6 and after a bit googled, we have found rxjs migration that guides us to install both rxjs and rxjs-compat at ^6.0.0.

Here is the command to install the rxjs packages for fixing the error:

npm install rxjs@6 rxjs-compat@6 --save

After you install the above two packages, the error should go away.

Learn more about rxjs migration guide.

0 0 vote
Article Rating
guest
1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
moric
moric
2 years ago

You are really awesome…!, thanks for making such a nice blog

1
0
Would love your thoughts, please comment.x
()
x