typescript Angular 14的ngx-pinch-zoom

u5rb5r59  于 2023-05-23  发布在  TypeScript
关注(0)|答案(1)|浏览(227)

有没有办法为Angular 14安装ngx-pinch-zoom?
当然,这里存在一个对等依赖冲突,在project中使用--legacy-peer-deps安装pinch-zoom可以工作,但由于该冲突,在ci/cd管道上失败了。
我尝试安装ngx-pinch-zoom和ngx-pinch-zoom-13,但在我看来,Angular 14没有ngx-pinch-zoom版本。或者我错过了什么?

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

py49o6xq1#

我想你有两个选择:

  • 编辑您的ci/cd管道并添加--legacy-peer-deps
  • fork ngx-pinch-zoom,为angular 14做好准备并使用您的版本(并执行pull request)

相关问题