Reputation: 16300
I just upgraded my Angular 5 project to 6. And build is failing with:
ERROR in node_modules/@ng-bootstrap/ng-bootstrap/datepicker/datepicker-service.d.ts(5,10): error TS2305: Module '"C:/myapp/node_modules/rxjs/Observable"' has no exported member 'Observable'.node_modules/@ng-bootstrap/ng-bootstrap/typeahead/typeahead.d.ts(3,10): error TS2305: Module '"C:/myapp/node_modules/rxjs/Observable"' has no exported member 'Observable'.node_modules/rxjs/Observable.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/Observable'.
Any ideas on how to solve this?
NOTE:
This problem occurs if adding ng-bootstrap
to the project (even a new Angular 6 project).
Upvotes: 5
Views: 2081
Reputation: 1012
You can use v2.0.0 of ng-bootstrap
which is now compatible with Angular 6. Update dependency in package.json
:
"@ng-bootstrap/ng-bootstrap": "^2.0.0"
This way you don't need rxjs-compat
, but make sure your code is RxJs 6 compatible. Also note the breaking changes of ng-bootstrap 2.0.0 release.
Upvotes: 1
Reputation: 86740
Most probably you need to update RxJS with RxJS 6.0.0
as per changelog
Upvotes: 0