ultrasonicsoft / ng-connection-service

Detects active internet connection in Angular application via DI ready Observable service.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

geting error of defineInjectable

rohitgaidhane opened this issue · comments

WARNING in ./node_modules/ng-connection-service/fesm5/ng-connection-service.js
35:59-75 "export 'defineInjectable' was not found in '@angular/core'
ℹ 「wdm」: Compiled with warnings.
///
ng-connection-service.js:35 Uncaught TypeError: Object(...) is not a function
at ng-connection-service.js:35
at Object../node_modules/ng-connection-service/fesm5/ng-connection-service.js (ng-connection-service.js:37)
at webpack_require (bootstrap:81)
at Object../src/app/app.component.ts (main.js:388)
at webpack_require (bootstrap:81)
at Object../src/app/app.module.ts (app.component.ts:10)
at webpack_require (bootstrap:81)
at Object../src/main.ts (environment.ts:36)
at webpack_require (bootstrap:81)
at Object.0 (main.ts:11)
(anonymous) @ ng-connection-service.js:35
./node_modules/ng-connection-service/fesm5/ng-connection-service.js @ ng-connection-service.js:37
webpack_require @ bootstrap:81
./src/app/app.component.ts @ main.js:388
webpack_require @ bootstrap:81
./src/app/app.module.ts @ app.component.ts:10
webpack_require @ bootstrap:81
./src/main.ts @ environment.ts:36
webpack_require @ bootstrap:81
0 @ main.ts:11
webpack_require @ bootstrap:81
checkDeferredModules @ bootstrap:43
webpackJsonpCallback @ bootstrap:30
(anonymous) @ main.js:1
client?719c:147 [WDS] Warnings while compiling.
warnings @ client?719c:147
onmessage @ socket.js:41
EventTarget.dispatchEvent @ sockjs.js:170
(anonymous) @ sockjs.js:883
SockJS._transportMessage @ sockjs.js:881
EventEmitter.emit @ sockjs.js:86
WebSocketTransport.ws.onmessage @ sockjs.js:2957
wrapFn @ zone.js:1166
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask @ zone.js:421
push../node_modules/zone.js/dist/zone.js.Zone.runTask @ zone.js:188
push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask @ zone.js:496
invokeTask @ zone.js:1517
globalZoneAwareCallback @ zone.js:1543
client?719c:153 ./node_modules/ng-connection-service/fesm5/ng-connection-service.js
35:59-75 "export 'defineInjectable' was not found in '@angular/core'
warnings @ client?719c:153
onmessage @ socket.js:41
EventTarget.dispatchEvent @ sockjs.js:170
(anonymous) @ sockjs.js:883
SockJS._transportMessage @ sockjs.js:881
EventEmitter.emit @ sockjs.js:86
WebSocketTransport.ws.onmessage @ sockjs.js:2957
wrapFn @ zone.js:1166
push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask @ zone.js:421
push../node_modules/zone.js/dist/zone.js.Zone.runTask @ zone.js:188
push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask @ zone.js:496
invokeTask @ zone.js:1517
globalZoneAwareCallback @ zone.js:1543

Hello, were you able to resolve this?

This is angular 6 project. Hence you can not use it in Angular 5. I could try to deploy angular 5 version library if you want.

My application is grown too complex that It will take a lot of time upgrading it to version 6. Yes, Please try to deploy an angular 5 version library. I will be very grateful.

Will it support angular 7.1?

Of course it will work with 7.1. Also if you want to use it for Angular 5, you can copy NgConnectionService.ts file and put inside your code directly.

Thank you so much @ultrasonicsoft. I upgraded my application to angular 7.1 and It's working perfectly.

Cool!