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/lib/auto-login/auto-login-all-routes.guard.d.ts:14:5 - error TS2416: Property 'canLoad' in type 'AutoLoginAllRoutesGuard' is not assignable to the same property in base type 'CanLoad'. #1178

Closed
viswadv opened this issue Jul 8, 2021 · 10 comments

Comments

@viswadv
Copy link

viswadv commented Jul 8, 2021

Hello Damien,
After upgrading the lib and Angular to v12 started getting this on the build. Could you please have a look at it, something with return types of the below methods.

Error: node_modules/angular-auth-oidc-client/lib/auto-login/auto-login-all-routes.guard.d.ts:15:5 - error TS2416: Property 'canActivate' in type 'AutoLoginAllRoutesGuard' is not assignable to the same property in base type 'CanActivate'.

Error: node_modules/angular-auth-oidc-client/lib/interceptor/auth.interceptor.d.ts:14:5 - error TS2416: Property 'intercept' in type 'AuthInterceptor' is not assignable to the same property in base type 'HttpInterceptor'.

Thanks!

@zachstarnes
Copy link

I am having the same issue as above. Upgraded to Angular 12 and V12.

@FabianGosebrink
Copy link
Collaborator

FabianGosebrink commented Jul 9, 2021

Can you share a sample repo to reproduce this? Or can we reproduce this with one of our samples? Just tried it out and can not reproduce it in our samples.

@avidan-chen
Copy link

@viswadv @zachstarnes @FabianGosebrink I had this too. Found out the issue was due to updating to Rx.js 7 (because if you're updating, why not update all packages, right?).
Turns out Angular 12 doesn't support Rx.js 7. Downgrade to 6.6.7 and you'll be good to go.

@FabianGosebrink
Copy link
Collaborator

@viswadv @zachstarnes waiting for your feedback and then closing this.

@viswadv
Copy link
Author

viswadv commented Jul 13, 2021

@avidan-chen we are using Rxjs v6.6.x, we never updated Rxjs to v7. But I can cross-check one more time and get back to you.

@FabianGosebrink Unfortunately, I cannot share the repo it's a private app.

@FabianGosebrink
Copy link
Collaborator

FabianGosebrink commented Jul 13, 2021

I can totally understand that you can not share the repo. What I meant was: please share a minimal repo which shows the issue.

  1. do an ng new ...
  2. install the lib
  3. make it show the error
  4. share it on GitHub

You can use a config from our samples if you like.

Then I can have a look and see what the error is.. Thanks!

@viswadv
Copy link
Author

viswadv commented Jul 13, 2021

@FabianGosebrink Sure will do that. Please give me a day or two will try to reproduce it with one of the samples.

@FabianGosebrink
Copy link
Collaborator

Perfect. Waiting for your repo then :)

@dpeppert
Copy link

Hi everyone, I was having the same issue after upgrading my app to angular 12 and V12.

I solved this problem by deleting the node_modules/rxjs and node_modules/rxjs-compact folder and executed npm install again with rxjs v6.6.7

@viswadv
Copy link
Author

viswadv commented Jul 14, 2021

@dpeppert @avidan-chen @FabianGosebrink This is working fine with rxjs 6.6.7, earlier we have 6.6.6. Thanks for the help.

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

No branches or pull requests

5 participants