首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Npm依赖性问题: and 17.0.2和“react可滑动-视图”

Npm依赖性问题: and 17.0.2和“react可滑动-视图”
EN

Stack Overflow用户
提问于 2022-11-23 10:11:08
回答 1查看 31关注 0票数 0

我试图将react-swipeable-views库添加到我的项目中,但我得到了以下错误:

代码语言:javascript
复制
    npm ERR! code ERESOLVE
    npm ERR! ERESOLVE unable to resolve dependency tree
    npm ERR!
    npm ERR! While resolving: e-ecom@0.1.0
    npm ERR! Found: react@18.2.0
    npm ERR! node_modules/react
    npm ERR!   react@"^18.2.0" from the root project
    npm ERR!
    npm ERR! Could not resolve dependency:
    npm ERR! peer react@"^15.3.0 || ^16.0.0 || ^17.0.0" from react-swipeable-views@0.14.0
    npm ERR! node_modules/react-swipeable-views
    npm ERR!   react-swipeable-views@"0.14.0" 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.
    npm ERR!

我怎么解决这个问题?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-11-23 11:27:48

您可以尝试在安装命令的末尾添加

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/74545068

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档