paulhobbel / angular2-auth

Provides an angular2 auth module to handle authentication based on JWT
MIT License
13 stars 10 forks source link

ForRoot error #14

Open GHakopian opened 7 years ago

GHakopian commented 7 years ago

Hi In the new Angular CLI the ng serve returns an error on AuthModule.forRoot()

ERROR in Error encountered resolving symbol values statically. Calling function 'AuthModule', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol AppModule in D:/Git/ClientWeb/src/app/app.module.ts, resolving symbol AppModule in D:/Git/ClientWeb/src/app/app.module.ts

the error will go away when you save once anywhere in the project, but it will stop any publish command for production.

paulhobbel commented 7 years ago

Oh that's weird, will look into it

hsueing3 commented 7 years ago

I'm experiencing the same issue. Could this be caused by the upgrade to Angular4?

paulhobbel commented 7 years ago

Yes I believe so, I think I need to use it in a different way now.

hsueing3 commented 7 years ago

Any ETA on a fix? Would love to continue using this service but will need to switch to another solution pretty soon if there are no updates. :(

paulhobbel commented 7 years ago

Writing a fix right now

paulhobbel commented 7 years ago

Ok this issue should be fixed in 0.1.7. Reopen the issue if the bug still exists.

paulhobbel commented 7 years ago

Still seems to happen.

marcelo-tavares commented 6 years ago

Is there anything new about this issue?

mbehrisch commented 6 years ago

I would need some help with this as well!

paulhobbel commented 6 years ago

Ok so this module was originally written for angular2 We are now on angular5 I think, correct me if I am wrong.

Does anyone know how forRoot works in Modules now? I also noticed the ReflectiveInjector is deprecated now... loads of stuff to fix.