我正在尝试安装
npm i angular-responsive-carousel
,但出现以下错误
npm ERR! While resolving: [email protected]
npm ERR! Found: @angular/[email protected]
npm ERR! node_modules/@angular/common
npm ERR! @angular/common@"~13.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/common@"^11.2.14" from [email protected]
npm ERR! node_modules/angular-responsive-carousel
npm ERR! angular-responsive-carousel@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
目前还没有与 Angular 13 兼容的版本。
但是,我在 Angular 12 上遇到了同样的问题,并决定也分享修复方案: 像这样使用 2.1.0 版本的 Angular Carousel 包
npm i [email protected]
。
希望这对某人有帮助。
参考:https://github.com/ivylaboratory/angular-carousel/issues/114#issuecomment-995196654
你可以查看我的fork版本:
https://github.com/PikusSpbSandbox/carousel-angular 或
npm i carousel-angular
我遇到了同样的问题,但我用legacy-peer-deps修复了它,它将允许您忽略这个包的旧依赖项。 这是代码
npm 我角度响应轮播--legacy-peer-deps
npm audit fix --force
npm i angular-responsive-carousel --legacy-peer-deps