我从GitHub克隆了一个项目,并尝试使用npm install
安装依赖项,但它抛出错误:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: 3dfolio@0.0.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.0.0 || ^16.0.0-beta || ^16.0.0" from react-tilt@0.1.4
npm ERR! node_modules/react-tilt
npm ERR! react-tilt@"^0.1.4" 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 C:\Users\Gyan Prakash\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Gyan Prakash\AppData\Local\npm-cache\_logs\2023-03-06T18_09_10_160Z-debug-0.log
存在解决该错误的任何方法。
2条答案
按热度按时间vxf3dgd41#
//运行
fgw7neuy2#
在npm命令的末尾添加--legacy-peer-deps,如下所示👇
或