Closed andy- closed 6 years ago
I think it's a duplicate of #86
@andy- as a temporary solution, you could try to run - "npm install pbriones/ng2-signalr"
@mcgri it worked! thanks!
Any advice on how to reference pbriones' version from package.json? npm install didn't like just the string shown above by mcgri so I tried adding this line to my package.json:
"ng2-signalr": "git+https://github.com/pbriones/ng2-signalr.git",
which worked but cloned the source files. This caused the compiler to complain that index.ts wasn't included; I then tried to add it to the tsconfig files[] but that didn't seem to help.
So what's the best way to add this so a team can consume it easily? Thanks!
@stevencohn this worked on my team: "ng2-signalr": "github:pbriones/ng2-signalr" we use --aot flag to build and serve.
Hey guys after trying to install from the newer version of the library (pbriones' updated version), I am always getting a warning concerning angular/router. The thing is, if I check the version of angular/router, it says 3.10.10 which should be okay, but still the error persists. I am only getting the following warning:
npm WARN ng2-signalr@2.1.1 requires a peer of @angular/router@>=3.0.0 || >= 5.0.0 but none was installed.
However when I run the app, it is complaining about not finding index.js within the ng2-signalr folder.
Any ideas on how to proceed?
Hey @Floyd1256 did you solved it? I have the same issue with my app..
@itsikhar : for @andy- 's solution worked.... its temporary fix .... but I found a benfit here that,... all my team members will start using --aot with there development itself 🥇
https://github.com/HNeukermans/ng2-signalr/issues/92#issuecomment-343507355
Hey @sreekumarp, I can't use @andy- solution cause i'm working with Ionic and it doesn't support this flag.
Hey @itsikhar I actually had to transpile the downloaded module along with jquery and signalr libraries. If you get an error concerning jquery after that try to re-import it because that's what worked for me. Took me some time so I recommend waiting for the author's update if you're not in a hurry.
Hey @Floyd1256 , Thanks for your answer, For now I also decided to change my service to work with jQuery untill the author will update. Thank you :)
@itsikhar Ionic its by default aot compiled, but you can try npm run build --prod --aot
As mentioned in issue #86, this git repo has been updated to deal with OpaqueToken however it doesn't appear that this change has been published to npm yet. You can download this repo and build locally and install from the local dist folder. Or @HNeukermans could update npm! Please!?
Any update on getting this to npm? Ran into the same issue and would like to use the library
Guys, please push this update to npm. We need it
@HNeukermans : can you please publish it ?
Joining to the request
Thanks
temporary solution is to install it from github
npm install github:HNeukermans/ng2-signalr
it worked for me
Trying to use either repository (trying to upgrade from Angular4 to Angular5) I'm getting this error:
Error:
Thanks!
+1
I forked and compiled and published this library as a temporary measure under different scope.. so that it becomes usable for Angular 5..
please use it as npm i @dharapvj/ngx-signalr
. It will install v3.0.0 and you will not face the issue of OpaqueToken anymore.
I personally gave up on this project and just learnt to implement it myself with the base JQuery approach... It's fairly easy to do yourself.
@Groverize I also tried going jq, but i had funny issues with change detection...
Try my package once
On 23-Jan-2018 3:00 PM, "LeeroyMagic" notifications@github.com wrote:
@Groverize https://github.com/groverize I also tried going jq, but i had funny issues with change detection...
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/HNeukermans/ng2-signalr/issues/92#issuecomment-359731605, or mute the thread https://github.com/notifications/unsubscribe-auth/AB1PnqzYc56IJfneFrEAyzZSwffSjffkks5tNaaygaJpZM4QXFyx .
@dharapvj I tried it it's excellent Thanks!
Ha!
Thanks..
I did not do anything..
I just cloned, did some quick edits to remove 'ng2' references and published it under my name.
Good to know that is working for others as well.
Cheers, VJ
On Tue, Jan 23, 2018 at 4:56 PM, LeeroyMagic notifications@github.com wrote:
@dharapvj https://github.com/dharapvj I tried it it's excellent Thanks!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/HNeukermans/ng2-signalr/issues/92#issuecomment-359761632, or mute the thread https://github.com/notifications/unsubscribe-auth/AB1PnuDAUf84C9Fa9li-j1dns7VOKI5tks5tNcIEgaJpZM4QXFyx .
@dharapvj works like a dream!!! Thank you so much for doing this!
@dharapvj brao! Saved my day :)
Angular 5 support has been published
Hello, i have migrated mi app from Angular 4 to Angular 5. I am getting this error:
Uncaught TypeError: WEBPACK_IMPORTED_MODULE_0__angular_core.OpaqueToken is not a constructor at eval (signalr.module.js:3) at Object.../../../../ng2-signalr/src/services/signalr.module.js (vendor.bundle.js:1566) at webpack_require (inline.bundle.js:55) at eval (signalr.js:5) at Object.../../../../ng2-signalr/src/services/signalr.js (vendor.bundle.js:1558) at webpack_require (inline.bundle.js:55) at eval (ng2-signalr.js:17) at Object.../../../../ng2-signalr/src/ng2-signalr.js (vendor.bundle.js:1494) at webpack_require (inline.bundle.js:55) at eval (webpack-internal:///../../../../ng2-signalr/index.js:1) at Object.../../../../ng2-signalr/index.js (vendor.bundle.js:1478) at webpack_require (inline.bundle.js:55) at eval (ops-notification.service.ts:7) at Object.../../../../../src/app/shared/services/ops-notification.service.ts (main.bundle.js:1502)