[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, post on Stackoverflow or Gitter
Current behavior
Can't use Angular 6 with the datatable. The final Angular 6 is official released now.
Expected behavior
Should be able to use Angular 6 with the datatable.
Reproduction of the problem
ng update @angular/core, you will see the following error: Package "@swimlane/ngx-datatable" has an incompatible peer dependency to "rxjs" (requires "^5.0.0", would install "6.1.0").What is the motivation / use case for changing the behavior?
Allow usage with Angular 6
Please tell us about your environment:
OS X, yarn
Table version:
"@swimlane/ngx-datatable": "^11.1.7"
Angular version:
6.0.0
Nevermind, I updated all the packages manually and got it to work.
Hi, what have you updated manually?
Please use ngx-datatable 12.0.0 with Angular 6.
@marjan-georgiev Does that still require rxjs-compat? Or have all rxjs imports been fixed?
All imports have been fixed and updated to rxjs 6.1.0
I'm getting the same error when I run
ng update --all
I got:
Package "@swimlane/ngx-datatable" has an incompatible peer dependency to "rxjs" (requires "^5.0.0", would install "6.1.0")
Could you please explain the steps you took in order to fix it?
@juanchofelipe Try ng update --all --force, and then update ngx-datatable to 12.0.0 manually, or update ngx-datatable before running ng update
@Matmo10 thank you so much, after follow your instruction I was able to complete the upgrade process. However, when served the project, I got the next errors:
ERROR in node_modules/rxjs/BehaviorSubject.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/BehaviorSubject'.
node_modules/@swimlane/ngx-datatable/release/components/datatable.component.d.ts(10,10): error TS2305: Module '"C:/Ideas/Source/b2bAngular/node_modules/rxjs/BehaviorSubject"' has no exported member 'BehaviorSubject'.
node_modules/rxjs/Subscription.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/Subscription'.
node_modules/ng2-materialize/dist/datepicker/datepicker.directive.d.ts(6,10): error TS2305: Module '"C:/Ideas/Source/b2bAngular/node_modules/rxjs/Subscription"' has no exported member 'Subscription'.
node_modules/ng2-materialize/dist/validation/error-message/error-message.component.d.ts(3,10): error TS2305: Module '"C:/Ideas/Source/b2bAngular/node_modules/rxjs/Subscription"' has no exported member 'Subscription'.
node_modules/ng2-materialize/dist/validation/validation.component.d.ts(6,10): error TS2305: Module '"C:/Ideas/Source/b2bAngular/node_modules/rxjs/Subscription"' has no exported member 'Subscription'.
node_modules/ng2-materialize/dist/select/select-container/select-container.component.d.ts(3,10): error TS2305: Module '"C:/Ideas/Source/b2bAngular/node_modules/rxjs/Subscription"' has no exported member 'Subscription'.
node_modules/ng2-materialize/dist/input/input.directive.d.ts(9,10): error TS2305: Module '"C:/Ideas/Source/b2bAngular/node_modules/rxjs/Subscription"' has no exported member 'Subscription'.
node_modules/ng2-materialize/dist/textarea/textarea.directive.d.ts(6,10): error TS2305: Module '"C:/Ideas/Source/b2bAngular/node_modules/rxjs/Subscription"' has no exported member 'Subscription'.
node_modules/rxjs/Observable.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/Observable'.
node_modules/@agm/core/services/google-maps-api-wrapper.d.ts(2,10): error TS2305: Module '"C:/Ideas/Source/b2bAngular/node_modules/rxjs/Observable"' has no exported member 'Observable'.
node_modules/@agm/core/services/managers/marker-manager.d.ts(2,10): error TS2305: Module '"C:/Ideas/Source/b2bAngular/node_modules/rxjs/Observable"' has no exported member 'Observable'.
node_modules/@agm/core/services/managers/info-window-manager.d.ts(1,10): error TS2305: Module '"C:/Ideas/Source/b2bAngular/node_modules/rxjs/Observable"' has no exported member 'Observable'.
node_modules/@agm/core/services/managers/circle-manager.d.ts(2,10): error TS2305: Module '"C:/Ideas/Source/b2bAngular/node_modules/rxjs/Observable"' has no exported member 'Observable'.
node_modules/@agm/core/services/managers/polygon-manager.d.ts(2,10): error TS2305: Module '"C:/Ideas/Source/b2bAngular/node_modules/rxjs/Observable"' has no exported member 'Observable'.
node_modules/@agm/core/services/managers/polyline-manager.d.ts(2,10): error TS2305: Module '"C:/Ideas/Source/b2bAngular/node_modules/rxjs/Observable"' has no exported member 'Observable'.
node_modules/@agm/core/services/managers/kml-layer-manager.d.ts(2,10): error TS2305: Module '"C:/Ideas/Source/b2bAngular/node_modules/rxjs/Observable"' has no exported member 'Observable'.
node_modules/@agm/core/services/managers/data-layer-manager.d.ts(2,10): error TS2305: Module '"C:/Ideas/Source/b2bAngular/node_modules/rxjs/Observable"' has no exported member 'Observable'.
node_modules/@ngx-translate/core/src/translate.loader.d.ts(1,10): error TS2305: Module '"C:/Ideas/Source/b2bAngular/node_modules/rxjs/Observable"' has no exported member 'Observable'.
node_modules/@ngx-translate/core/src/translate.service.d.ts(2,10): error TS2305: Module '"C:/Ideas/Source/b2bAngular/node_modules/rxjs/Observable"' has no exported member 'Observable'.
node_modules/@ngx-translate/core/src/translate.directive.d.ts(2,10): error TS2305: Module '"C:/Ideas/Source/b2bAngular/node_modules/rxjs/Subscription"' has no exported member 'Subscription'.
node_modules/primeng/components/common/messageservice.d.ts(1,10): error TS2305: Module '"C:/Ideas/Source/b2bAngular/node_modules/rxjs/Observable"' has no exported member 'Observable'.
node_modules/primeng/components/messages/messages.d.ts(4,10): error TS2305: Module '"C:/Ideas/Source/b2bAngular/node_modules/rxjs/Subscription"' has no exported member 'Subscription'.
node_modules/primeng/components/table/table.d.ts(8,10): error TS2305: Module '"C:/Ideas/Source/b2bAngular/node_modules/rxjs/Subscription"' has no exported member 'Subscription'.
node_modules/primeng/components/table/table.d.ts(9,10): error TS2305: Module '"C:/Ideas/Source/b2bAngular/node_modules/rxjs/Observable"' has no exported member 'Observable'.
node_modules/primeng/components/accordion/accordion.d.ts(4,10): error TS2305: Module '"C:/Ideas/Source/b2bAngular/node_modules/rxjs/Subscription"' has no exported member 'Subscription'.
I completed all the steps provided by the Angular Update Guide.
@juanchofelipe Make sure you have "rxjs-compat": "^6.1.0", somewhere in your package.json dependencies if you have other libraries/dependencies that aren't updated to use rxjs 6 yet. ng-update should have added it already I think, but make sure.
@Matmo10 Thank you again, I had to reinstall rxjs and rxjs-compat and that fixed my problem! You rock!
Can someone provide a list of package versions please ? ... copy/paste of the package.json will be greate. thanks
Hi ,
what are the rxjs and ngx-datatable versions for angular v5
thanks :)
Most helpful comment
@juanchofelipe Make sure you have
"rxjs-compat": "^6.1.0",somewhere in your package.json dependencies if you have other libraries/dependencies that aren't updated to use rxjs 6 yet. ng-update should have added it already I think, but make sure.