Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: ./node_modules/angular-auth-oidc-client/fesm2015/angular-auth-oidc-client.js 4790:36-60 "export 'ɵɵngDeclareInjectable' (imported as 'i0') was not found in '@angular/core' #1172

Closed
garvraj opened this issue Jul 6, 2021 · 12 comments

Comments

@garvraj
Copy link

garvraj commented Jul 6, 2021

My angular version is 11 , and i am using latest version of "angular-auth-oidc-client": "^12.0.1"
It's not working for me, giving me the below error

Error: ./node_modules/angular-auth-oidc-client/fesm2015/angular-auth-oidc-client.js 4835:24-48
"export 'ɵɵngDeclareInjectable' (imported as 'i0') was not found in '@angular/core'

@garvraj
Copy link
Author

garvraj commented Jul 6, 2021

@damienbod Can you please help me on this on priority

Thanks in advance

@FabianGosebrink
Copy link
Collaborator

FabianGosebrink commented Jul 7, 2021

I am not @damienbod but have you tried updating your angular app to V12?

@garvraj
Copy link
Author

garvraj commented Jul 7, 2021

I am not @damienbod but have you tried updating your angular app to V12?

Ahh Sorry for wrong tag,

No I have not updated to V12, my angular was V12 from start , I just installed angular-auth-oidc-client

@FabianGosebrink
Copy link
Collaborator

Ah then please make sure you use this lib in V12 with Angular in V12.

@garvraj
Copy link
Author

garvraj commented Jul 7, 2021

Ah then please make sure you use this lib in V12 with Angular in V12.

So if I use V11 angular then i must use angular-auth-oidc-client version 11

@FabianGosebrink
Copy link
Collaborator

FabianGosebrink commented Jul 7, 2021

Normally Angular 11 should work with this Lib V12. But you said, that you're on Angular 12, right?

my angular was V12 from start

@garvraj
Copy link
Author

garvraj commented Jul 7, 2021

Normally Angular 11 should work with this Lib V12. But you said, that you're on Angular 12, right?

my angular was V12 from start

No I am on Angular 11 and I am using lib V12, which is giving me below error
Error: ./node_modules/angular-auth-oidc-client/fesm2015/angular-auth-oidc-client.js 2722:0-27
"export 'ɵɵngDeclareClassMetadata' (imported as 'i0') was not found in '@angular/core'

@damienbod
Copy link
Owner

Is this issue related to this one?

#1178

Greetings Damien

@garvraj
Copy link
Author

garvraj commented Jul 15, 2021

Is this issue related to this one?

#1178

Greetings Damien

Not exactly, My issue is because I was using angular 11 with V12 angular-auth-oidc-client

@FabianGosebrink
Copy link
Collaborator

Can this be closed then?

@garvraj
Copy link
Author

garvraj commented Jul 18, 2021

Yes this can be closed but still I did not understand why angular 11 with V12 angular-auth-oidc-client cannot be used

@FabianGosebrink
Copy link
Collaborator

From https://angular.io/guide/creating-libraries#ensuring-library-version-compatibility

The Angular version used to build an application should always be the same or greater than the Angular versions used to build any of its dependent libraries. For example, if you had a library using Angular version 12, the application that depends on that library should use Angular version 12 or later. Angular does not support using an earlier version for the application.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants