angulartypescriptnpmcicdpinchzoom

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```

Solution

  • I guess you have 2 options: