angularx-social-login icon indicating copy to clipboard operation
angularx-social-login copied to clipboard

angularx-social-login:4 does not work with angular 13

Open shahin4u000 opened this issue 1 year ago • 1 comments

I am using angular 13 in my project. In the web its stated that angularx-social-login:4 should work with angular 13. However, I am having error while running npm ci with this peer dependency. That is what I am getting:

npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: @angular/[email protected]
npm ERR! node_modules/@angular/common
npm ERR!   @angular/common@"~13.3.11" from the root project
npm ERR!   peer @angular/common@"^13.0.1" from @angular-material-components/[email protected]
npm ERR!   node_modules/@angular-material-components/datetime-picker
npm ERR!     @angular-material-components/datetime-picker@"^7.0.1" from the root project
npm ERR!   14 more (@angular/cdk, @angular/forms, @angular/material, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^12.0.0" from [email protected]
npm ERR! node_modules/angularx-social-login
npm ERR!   angularx-social-login@"^4.1.0" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: @angular/[email protected]
npm ERR! node_modules/@angular/common
npm ERR!   peer @angular/common@"^12.0.0" from [email protected]
npm ERR!   node_modules/angularx-social-login
npm ERR!     angularx-social-login@"^4.1.0" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See C:\Users\kgo\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\kgo\AppData\Local\npm-cache\_logs\2022-09-07T19_17_45_968Z-debug-0.log     

I tried with @abacritt/angularx-social-login but that is also not working with angular 13. Does anyone knows how to solve this issue.

shahin4u000 avatar Sep 07 '22 19:09 shahin4u000

Same problem here. I've tried installing with --force but got the following error when building the app:

./node_modules/@abacritt/angularx-social-login/fesm2015/abacritt-angularx-social-login.mjs - Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js):
TypeError: Cannot create property 'message' on string 'C:\Users\Roger\frontend\node_modules\@abacritt\angularx-social-login\fesm2015\abacritt-angularx-social-login.mjs: This application depends upon a library published using Angular version 14.2.0, which requires Angular version 14.0.0 or newer to work correctly.:\Users\Roger\frontend>ionic -v
Consider upgrading your application to use a more recent version of Angular.
  459 | }
  460 | GoogleSigninButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: GoogleSigninButtonDirective, deps: [{ token: i0.ElementRef }, { token: SocialAuthService }], target: i0.ɵɵFactoryTarget.Directive });ova-build --platform=browser
  461 | GoogleSigninButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.0", type: GoogleSigninButtonDirective, selector: "asl-google-signin-button", inputs: { type: "type", size: "size", text: "text", shape: "shape", theme: "theme", logo_alignment: "logo_alignment", width: "width", locale:39m "locale" }, ngImport: i0 });

It seems that GoogleSigninButtonDirective.ɵdir minVersion: "14.0.0" is the source of the problem

BentakApps avatar Sep 12 '22 10:09 BentakApps

Same problem here

aaron-cardenas avatar Oct 06 '22 21:10 aaron-cardenas

I encountered same problem in Angular 13, so I fixed it by adding this flag:

--legacy-peer-dep to the npm install.

So, install with this: npm i angularx-social-login --legacy-peer-deps

kellyblaire1 avatar Nov 02 '22 19:11 kellyblaire1

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 05 '23 03:01 stale[bot]

This problem has been solved with this: npm i angularx-social-login --legacy-peer-deps Thank you for your contributies. @kellyblaire1

Guner27 avatar Dec 18 '23 19:12 Guner27

Glad to hear that!

kellyblaire1 avatar Dec 18 '23 20:12 kellyblaire1