Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build failing after upgrading to Angular 6

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).

like image 872
Ivan-Mark Debono Avatar asked May 04 '18 06:05

Ivan-Mark Debono


People also ask

How do I upgrade Angularjs 6 to 12?

ng update will migrate you automatically. Run ng update @angular/core@12 @angular/cli@12 which should bring you to version 12 of Angular. Angular now requires TypeScript 4.2. ng update will update you automatically.


1 Answers

Do this:

npm install rxjs@6 rxjs-compat@6 --save
like image 138
Ivan-Mark Debono Avatar answered Sep 23 '22 19:09

Ivan-Mark Debono