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/[email protected]
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/[email protected]
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/[email protected]
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 [email protected]
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/[email protected]
npm ERR! node_modules/@angular/common
npm ERR! peer @angular/common@"~13.2.1" from [email protected]
npm ERR! node_modules/ngx-pinch-zoom-13
npm ERR! ngx-pinch-zoom-13@"^2.5.6" from the root project```
CodePudding user response:
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)