角度响应轮播安装问题 - IvyCarouselModule

问题描述 投票:0回答:5

我正在尝试安装

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 module carousel
5个回答
1
投票

目前还没有与 Angular 13 兼容的版本。

但是,我在 Angular 12 上遇到了同样的问题,并决定也分享修复方案: 像这样使用 2.1.0 版本的 Angular Carousel 包

npm i [email protected]

希望这对某人有帮助。

参考:https://github.com/ivylaboratory/angular-carousel/issues/114#issuecomment-995196654


1
投票

安装 Angular-responsive-carousel2:

npm install angular-responsive-carousel2

npm 项目链接

github项目链接

演示链接


1
投票

你可以查看我的fork版本:
https://github.com/PikusSpbSandbox/carousel-angular

npm i carousel-angular

它已升级为与 Angular 14+ 兼容,并进行了一些更改和错误修复。


0
投票

我遇到了同样的问题,但我用legacy-peer-deps修复了它,它将允许您忽略这个包的旧依赖项。 这是代码

npm 我角度响应轮播--legacy-peer-deps


0
投票
 npm audit fix --force

 npm i angular-responsive-carousel --legacy-peer-deps
© www.soinside.com 2019 - 2024. All rights reserved.