bartholomej / ngx-scrolltop

Lightweight, Material Design inspired "go to top button". No dependencies. Pure Angular!
http://bartholomej.github.io/ngx-scrolltop/
MIT License
30 stars 3 forks source link

Can't install on Angular 14 #47

Closed jpmous closed 2 years ago

jpmous commented 2 years ago

Package can't be installed on Angular 14 as dependencies are unmet :

ng add ngx-scrolltop@latest
ℹ Using package manager: npm
⚠ Package has unmet peer dependencies. Adding the package may not succeed.

The package ngx-scrolltop@latest will be installed and executed.
Would you like to proceed? Yes
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: myapp@1.0.0
npm ERR! Found: @angular/common@14.0.6
npm ERR! node_modules/@angular/common
npm ERR!   @angular/common@"^14.0.5" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@">=12 <14" from ngx-scrolltop@4.1.2
npm ERR! node_modules/ngx-scrolltop
npm ERR!   ngx-scrolltop@"4.1.2" from the root project
ng version

Angular CLI: 14.0.6
Node: 16.15.1
Package Manager: npm 8.14.0
OS: linux x64

Angular: 14.0.6
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1400.6
@angular-devkit/build-angular   14.0.6
@angular-devkit/core            14.0.6
@angular-devkit/schematics      14.0.6
@angular/cdk                    14.0.5
@angular/flex-layout            14.0.0-beta.40
@angular/material               14.0.5
@schematics/angular             14.0.6
rxjs                            7.5.6
typescript                      4.7.4
bartholomej commented 2 years ago

Thank you @jpmous I will fix it soon. In the meantime, you can try installing like this: ng add ngx-scrolltop@latest --force