MurhafSousli / ngx-sharebuttons

Angular Share Buttons ☂
https://ngx-sharebuttons.netlify.app/
MIT License
518 stars 124 forks source link

Can't install; error with cdk version #654

Closed TheGameKnave closed 1 month ago

TheGameKnave commented 7 months ago

Reproduction

Steps to reproduce:

  1. Use angular 15
  2. try to install any version of ngx-sharebuttons back to v.8.0.0

Expected Behavior

The package installs

Actual Behavior

The package errors out by demanding a version of @angular/cdk that I don't have.

(base) ?1 ~/websites/xyz/client [feature/tabs] %  npm i ngx-sharebuttons       
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: xyz@0.2.0
npm ERR! Found: @angular/common@15.2.10
npm ERR! node_modules/@angular/common
npm ERR!   @angular/common@"^15.0.4" from the root project
npm ERR!   peer @angular/common@">=14.0.0" from ngx-sharebuttons@13.0.0
npm ERR!   node_modules/ngx-sharebuttons
npm ERR!     ngx-sharebuttons@"*" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^17.0.0 || ^18.0.0" from @angular/cdk@17.0.1
npm ERR! node_modules/@angular/cdk
npm ERR!   peer @angular/cdk@">=14.0.0" from ngx-sharebuttons@13.0.0
npm ERR!   node_modules/ngx-sharebuttons
npm ERR!     ngx-sharebuttons@"*" 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.

even older builds want the newest cdk?

(base) ?1 ~/websites/xyz/client [feature/tabs] %  npm i ngx-sharebuttons@8.0.0
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: xyz@0.2.0
npm ERR! Found: @angular/common@15.2.10
npm ERR! node_modules/@angular/common
npm ERR!   @angular/common@"^15.0.4" from the root project
npm ERR!   peer @angular/common@">=8.0.0" from ngx-sharebuttons@8.0.0
npm ERR!   node_modules/ngx-sharebuttons
npm ERR!     ngx-sharebuttons@"8.0.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^17.0.0 || ^18.0.0" from @angular/cdk@17.0.1
npm ERR! node_modules/@angular/cdk
npm ERR!   peer @angular/cdk@">=8.0.0" from ngx-sharebuttons@8.0.0
npm ERR!   node_modules/ngx-sharebuttons
npm ERR!     ngx-sharebuttons@"8.0.0" from the root project

Environment

TheGameKnave commented 7 months ago

Works if I manually install the appropriate cdk version for my angular version but the docs could make mention of this potential pitfall.