Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular 4: Module not found error regarding RxJs

when building the Angular app I get many of these errors, below is just the first one

ERROR in ./~/@reactivex/rxjs/dist/cjs/Rx.js
Module not found: Error: Can't resolve './add/operator/filter' in 
'...\node_modules\@reactivex\rxjs\dist\cjs'
 @ ./~/@reactivex/rxjs/dist/cjs/Rx.js 70:0-32
 @ ./~/@reactivex/rxjs/index.js
 @ ./~/ri-api-client/dist/index.js
 @ ./src/app/core/api.service.ts
 @ ./src/$$_gendir/app/app.module.ngfactory.ts
 @ ./src/main.ts
 @ multi ./src/main.ts

what am I missing?

like image 531
Konstantinos Papakonstantinou Avatar asked May 08 '17 15:05

Konstantinos Papakonstantinou


1 Answers

I had similar error..

`ERROR in ./src/app/shared/giphy/giphy.service.ts`

Module not found: Error: Can't resolve 'rxjs/add/operator/map' in '/Users/user1/opt/work/mine/development/ic/ic-pms/pms-ui/src/app/shared/giphy' ℹ 「wdm」: Failed to compile. ERROR in src/app/shared/giphy/giphy.service.ts(16,35): error TS2339: Property 'map' does not exist on type 'Observable<Object>'.

Ans solution for that is npm install rxjs@6 rxjs-compat@6 --save

like image 197
nani21984 Avatar answered Sep 27 '22 21:09

nani21984