简体   繁体   中英

ngx-pinch-zoom for Angular 14

Is there any way to install ngx-pinch-zoom for Angular 14?

Of course there is a peer dependency conflict and installing pinch-zoom with --legacy-peer-deps works in project but failed on the ci/cd pipeline because of that conflict.

I've tried to install ngx-pinch-zoom and ngx-pinch-zoom-13 but it seems to me like there is no ngx-pinch-zoom version for Angular 14. Or maybe I'm missing something?

npm ERR! Found: @angular/common@14.1.3
npm ERR! node_modules/@angular/common
npm ERR!   @angular/common@"^14.1.0" from the root project
npm ERR!   peer @angular/common@"^14.0.0 || ^15.0.0" from @angular/cdk@14.1.2
npm ERR!   node_modules/@angular/cdk
npm ERR!     @angular/cdk@"^14.1.2" from the root project
npm ERR!     peer @angular/cdk@"14.1.2" from @angular/material@14.1.2
npm ERR!     node_modules/@angular/material
npm ERR!       @angular/material@"^14.1.1" from the root project
npm ERR!   7 more (@angular/forms, @angular/material, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"~13.2.1" from ngx-pinch-zoom-13@2.5.6
npm ERR! node_modules/ngx-pinch-zoom-13
npm ERR!   ngx-pinch-zoom-13@"^2.5.6" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: @angular/common@13.2.7
npm ERR! node_modules/@angular/common
npm ERR!   peer @angular/common@"~13.2.1" from ngx-pinch-zoom-13@2.5.6
npm ERR!   node_modules/ngx-pinch-zoom-13
npm ERR!     ngx-pinch-zoom-13@"^2.5.6" from the root project```

I guess you have 2 options:

  • edit your ci/cd pipeline and add --legacy-peer-deps
  • fork ngx-pinch-zoom, make it ready for angular 14 and use your version (and do a pull request)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM