angular2-jwt-refresh icon indicating copy to clipboard operation
angular2-jwt-refresh copied to clipboard

import 'rxjs' should be removed

Open vicko23 opened this issue 9 years ago • 6 comments

import 'rxjs' is not needed with new angular core 2.4.9 . It's not working with this, I needed to remove require ('rxjs') from angular2-jwt-refresh.js in node_modules to get this to work

vicko23 avatar Mar 14 '17 11:03 vicko23

@vicko23, rxjs is a peer dependence of angular2-jwt and angular2-jwt-refresh. So this is necessary to get it work. Before you remote rxjs from node_modules you get any output errors?

I updated the project to 2.4.9 and don't get any error. If you want I can create a new branch with this.

leonardobazico avatar Mar 14 '17 20:03 leonardobazico

I get following error:

(SystemJS) XHR error (404 Not Found) loading http://localhost/node_modules/rxjs.js Error: XHR error (404 Not Found) loading http://localhost/node_modules/rxjs.js at XMLHttpRequest.wrapFn [as __zone_symbol___onreadystatechange] (http://localhost/node_modules/zone.js/dist/zone.js?1489568198837:1242:29) [] at Zone.runTask (http://localhost/node_modules/zone.js/dist/zone.js?1489568198837:166:47) [ => ] at XMLHttpRequest.ZoneTask.invoke (http://localhost/node_modules/zone.js/dist/zone.js?1489568198837:420:38) [] Error loading http://localhost/node_modules/rxjs.js as "rxjs" from http://localhost/node_modules/angular2-jwt-refresh/dist/angular2-jwt-refresh.js Not expecting this error? Report it at https://github.com/mgechev/angular-seed/issues (anonymous) @ (index):58 http://localhost/node_modules/rxjs.js Failed to load resource: the server responded with a status of 404 (Not Found)

Maybe it's problem with my angular-seed project. Anyway everything works great when I remove require('rxjs') from angular2-jwt-refresh.js so I would be very grateful if you create one branch for me without import('rxjs') in angular2-jwt-refresh.ts.

Thanks in advance

vicko23 avatar Mar 15 '17 08:03 vicko23

If rxjs is removed, the angular2-jwt-refresh don't works as expected.

Looks like location of rxjs is wrong on your project. When installed this should be in node_modules/rxjs/Rx.js

For while I made a branch with angular 2.4.9: https://github.com/leonardobazico/angular2-jwt-refresh/tree/angular2.4.9

You can clone this and check the tests or build a custom version.

Please, send your package.json.

leonardobazico avatar Mar 16 '17 18:03 leonardobazico

Yes it is in that location (node_modules/rxjs/Rx.js) and exactly because of that I think it should be import 'rxjs/Rx' instead of import 'rxjs' :)

vicko23 avatar Mar 17 '17 08:03 vicko23

@vicko23, please send the content of package.json

And the node and npm versions

leonardobazico avatar Mar 20 '17 13:03 leonardobazico

@vicko23 Doesn't look like you are going to get a response soon, but this does look like a bug to me. What do you think? I am concerned about removing that line every time in order to have it working. Am I doing something wrong ?

Ovidiu-S avatar Jul 07 '17 18:07 Ovidiu-S