我正在尝试安装材料仪表板
git clone https://github.com/creativetimofficial/material-dashboard-react.git.使用node-16
我运行npm install
我得到了
npm ERR! While resolving: material-dashboard-react@1.10.0
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR! react@"17.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^15.3.0 || ^16.0.0" from react-swipeable-views@0.13.9
npm ERR! node_modules/react-swipeable-views
npm ERR! react-swipeable-views@"0.13.9" 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!
npm ERR! See /home/simha/.npm/eresolve-report.txt for a full report.我该怎么解决这个问题。
发布于 2021-07-29 17:56:45
看起来根项目安装了@17.0.2。但“反应-可滑动-视图”要求版本15或16的反应。
编辑:作为第一种选择,您可以尝试将“react swipeable view”更新到它的最新版本。它可能支持React 17,下面的命令将更新它。
npm install react-swipeable-views@latest如果这不管用..。
尝试将package.json中的react数减少到16.x.x范围内的某个值,然后重新运行
npm install因此,它将满足对等依赖。
https://docs.npmjs.com/about-semantic-versioning
如果您不熟悉NPM语义版本控制,请使用此计算器。输入react -> "^16.0.0“以确保它不包括17
https://stackoverflow.com/questions/68573360
复制相似问题