Angular 6 with rxjs 6.0.0 Error
See original GitHub issueHi,
I just use angluar-cli create a new angular 6 project and try to add ngx-admin-lte in it. However, when I try to run ng serve it show error
ERROR in node_modules/@ngx-translate/core/src/translate.directive.d.ts(2,10): error TS2305: Module '"D:/Workspaces/temp/ng6-test/node_modules/rxjs/Subscription"' has no exported member 'Subscription'.
node_modules/@ngx-translate/core/src/translate.loader.d.ts(1,10): error TS2305: Module '"D:/Workspaces/temp/ng6-test/node_modules/rxjs/Observable"' has no exported member 'Observable'.
node_modules/@ngx-translate/core/src/translate.service.d.ts(2,10): error TS2305: Module '"D:/Workspaces/temp/ng6-test/node_modules/rxjs/Observable"' has no exported member 'Observable'.
node_modules/angular2-toaster/src/toaster.service.d.ts(3,10): error TS2305: Module '"D:/Workspaces/temp/ng6-test/node_modules/rxjs/Observable"' has no exported member 'Observable'.
node_modules/angular2-toaster/src/toaster.service.d.ts(5,10): error TS2305: Module '"D:/Workspaces/temp/ng6-test/node_modules/rxjs/Subject"' has no exported member 'Subject'.
node_modules/ngx-admin-lte/services/breadcrumb.service.d.ts(1,10): error TS2305: Module '"D:/Workspaces/temp/ng6-test/node_modules/rxjs/ReplaySubject"' has no exported member 'ReplaySubject'.
node_modules/ngx-admin-lte/services/control-sidebar.service.d.ts(1,10): error TS2305: Module '"D:/Workspaces/temp/ng6-test/node_modules/rxjs/Rx"' has no exported member 'ReplaySubject'.
node_modules/ngx-admin-lte/services/footer.service.d.ts(1,10): error TS2305: Module '"D:/Workspaces/temp/ng6-test/node_modules/rxjs/Rx"' has no exported member 'ReplaySubject'.
node_modules/ngx-admin-lte/services/logo.service.d.ts(1,10): error TS2305: Module '"D:/Workspaces/temp/ng6-test/node_modules/rxjs/Rx"' has no exported member 'ReplaySubject'.
node_modules/ngx-admin-lte/services/menu.service.d.ts(1,10): error TS2305: Module '"D:/Workspaces/temp/ng6-test/node_modules/rxjs/Rx"' has no exported member 'ReplaySubject'.
node_modules/ngx-admin-lte/services/messages.service.d.ts(2,10): error TS2305: Module '"D:/Workspaces/temp/ng6-test/node_modules/rxjs/Rx"' has no exported member 'Subject'.
node_modules/ngx-admin-lte/services/messages.service.d.ts(2,19): error TS2305: Module '"D:/Workspaces/temp/ng6-test/node_modules/rxjs/Rx"' has no exported member 'ReplaySubject'.
node_modules/ngx-admin-lte/services/notifications.service.d.ts(2,10): error TS2305: Module '"D:/Workspaces/temp/ng6-test/node_modules/rxjs/Rx"' has no exported member 'Subject'.
node_modules/ngx-admin-lte/services/notifications.service.d.ts(2,19): error TS2305: Module '"D:/Workspaces/temp/ng6-test/node_modules/rxjs/Rx"' has no exported member 'ReplaySubject'.
node_modules/ngx-admin-lte/services/rest.service.d.ts(3,10): error TS2305: Module '"D:/Workspaces/temp/ng6-test/node_modules/rxjs/Observable"' has no exported member 'Observable'.
node_modules/ngx-admin-lte/services/user.service.d.ts(2,10): error TS2305: Module '"D:/Workspaces/temp/ng6-test/node_modules/rxjs/Rx"' has no exported member 'ReplaySubject'.
node_modules/rxjs/Observable.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/Observable'.
node_modules/rxjs/ReplaySubject.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/ReplaySubject'.
node_modules/rxjs/Rx.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat'.
node_modules/rxjs/Subject.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/Subject'.
node_modules/rxjs/Subscription.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/Subscription'.
I then found out the issue is that ngx-translate 8.0.0 is not supported to rxjs 6.0.0, it need to update the ngx-translate version to 10.0.0. (References: https://github.com/ngx-translate/core/issues/816)
Next I found out the angular2-toaster also need to update to support rxjs 6. So I did update the angular2-toaster 6.0.0
Unfortunately, I still got the error from ngx-admin-lte:
ERROR in node_modules/ngx-admin-lte/node_modules/@ngx-translate/core/src/translate.directive.d.ts(2,10): error TS2305: Module '"D:/Workspaces/temp/ng6-test/node_modules/rxjs/Subscription"' has no exported member 'Subscription'.
node_modules/ngx-admin-lte/node_modules/@ngx-translate/core/src/translate.loader.d.ts(1,10): error TS2305: Module '"D:/Workspaces/temp/ng6-test/node_modules/rxjs/Observable"' has no exported member 'Observable'.
node_modules/ngx-admin-lte/node_modules/@ngx-translate/core/src/translate.service.d.ts(2,10): error TS2305: Module '"D:/Workspaces/temp/ng6-test/node_modules/rxjs/Observable"' has no exported member 'Observable'.
node_modules/ngx-admin-lte/node_modules/angular2-toaster/src/toaster.service.d.ts(3,10): error TS2305: Module '"D:/Workspaces/temp/ng6-test/node_modules/rxjs/Observable"' has no exported member 'Observable'.
node_modules/ngx-admin-lte/node_modules/angular2-toaster/src/toaster.service.d.ts(5,10): error TS2305: Module '"D:/Workspaces/temp/ng6-test/node_modules/rxjs/Subject"' has no exported member 'Subject'.
node_modules/ngx-admin-lte/services/breadcrumb.service.d.ts(1,10): error TS2305: Module '"D:/Workspaces/temp/ng6-test/node_modules/rxjs/ReplaySubject"' has no exported member 'ReplaySubject'.
node_modules/ngx-admin-lte/services/control-sidebar.service.d.ts(1,10): error TS2305: Module '"D:/Workspaces/temp/ng6-test/node_modules/rxjs/Rx"' has no exported member 'ReplaySubject'.
node_modules/ngx-admin-lte/services/footer.service.d.ts(1,10): error TS2305: Module '"D:/Workspaces/temp/ng6-test/node_modules/rxjs/Rx"' has no exported member 'ReplaySubject'.
node_modules/ngx-admin-lte/services/logo.service.d.ts(1,10): error TS2305: Module '"D:/Workspaces/temp/ng6-test/node_modules/rxjs/Rx"' has no exported member 'ReplaySubject'.
node_modules/ngx-admin-lte/services/menu.service.d.ts(1,10): error TS2305: Module '"D:/Workspaces/temp/ng6-test/node_modules/rxjs/Rx"' has no exported member 'ReplaySubject'.
node_modules/ngx-admin-lte/services/messages.service.d.ts(2,10): error TS2305: Module '"D:/Workspaces/temp/ng6-test/node_modules/rxjs/Rx"' has no exported member 'Subject'.
node_modules/ngx-admin-lte/services/messages.service.d.ts(2,19): error TS2305: Module '"D:/Workspaces/temp/ng6-test/node_modules/rxjs/Rx"' has no exported member 'ReplaySubject'.
node_modules/ngx-admin-lte/services/notifications.service.d.ts(2,10): error TS2305: Module '"D:/Workspaces/temp/ng6-test/node_modules/rxjs/Rx"' has no exported member 'Subject'.
node_modules/ngx-admin-lte/services/notifications.service.d.ts(2,19): error TS2305: Module '"D:/Workspaces/temp/ng6-test/node_modules/rxjs/Rx"' has no exported member 'ReplaySubject'.
node_modules/ngx-admin-lte/services/rest.service.d.ts(3,10): error TS2305: Module '"D:/Workspaces/temp/ng6-test/node_modules/rxjs/Observable"' has no exported member 'Observable'.
node_modules/ngx-admin-lte/services/user.service.d.ts(2,10): error TS2305: Module '"D:/Workspaces/temp/ng6-test/node_modules/rxjs/Rx"' has no exported member 'ReplaySubject'.
node_modules/rxjs/Observable.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/Observable'.
node_modules/rxjs/ReplaySubject.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/ReplaySubject'.
node_modules/rxjs/Rx.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat'.
node_modules/rxjs/Subject.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/Subject'.
node_modules/rxjs/Subscription.d.ts(1,15): error TS2307: Cannot find module 'rxjs-compat/Subscription'.
i 「wdm」: Failed to compile.
It seems to be the ngx-admin-lte still using the ngx-translate 8.0.0. How can I fix it? Thanks 😃
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Issues with RxJS 6.4.0 and Angular CLI 6.1.x #4512 - GitHub
Issue. TL;DR: Angular CLI used TS 2.7 and pulled in RxJS ^6.0.0, RxJS 6 has always used TS 2.8, RxJS 6.4 introduced the...
Read more >Error TS1005: ';' expected. TypeScript Angular 6 For First Build ...
I was facing the same issue while developing an angular6 project. ... Go to the project directory run: npm install rxjs@6.0.0 --save.
Read more >Error after Update to Angular 6 - Material Design for Bootstrap
Hey,we upgrade our devenv and project from Angular 5.2 to Angular 6 as its described at the http://update.angular.io page.But now we get the...
Read more >Guide to update your Angular application v6.0 -> v12.0 for ...
Once you and all of your dependencies have updated to RxJS 6, remove rxjs-compat . Update to the new version. Review these changes...
Read more >node modules rxjs internal types d ts 81 44 error TS1005 ...
Which I had expected after the installation of Angular 6. ... Start with Going to package.json and modify "rxjs": "^6.0.0" to "rxjs": "6.0.0...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You can only go full Angular 6 if you do not have dependencies to
rxjs
prior to version 6. This is valid for direct or transitive dependencies.Check it with this:
npm list rxjs
. This only works if you have annpm install
.One of the implicit dependencies of Angular 6 is
rxjs
6.0. Now,ngx-admin-lte
comes withrxjs
5.x, hence you have to install a helper package. The magic happens withnpm install rxjs-compat
.I use
ngx-admin-lte
in an Angular 6.0.3 project successfully, thanks torxjs-compat
.You can remove this package as soon as your dependent packages - which use
rxjs
- have upgraded torxjs
6+.See https://update.angular.io/, the last point mentions:
In the long term,
ngx-admin-lte
has to upgrade to Angular 6.Good luck!
Hi how you did to upgrade these packets?
angular2-toaster ngx-translate