ERESOLVE无法在反应中解析依赖树

时间:2021-05-11 19:10:18

标签: reactjs npm dependencies

尝试添加依赖项有反应,但我无法安装任何软件包。我最近删除了一个 package-lock.json 来解决 ELOCKVERIFY 错误。我最终安装了以下“npm audit fix”命令,但我仍然出现相同的 ERESOLVE 错误。

npm 审计修复

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: client@0.1.0
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR!   react@"^17.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.0.0" from react-simple-typewriter@1.0.13
npm ERR! node_modules/react-simple-typewriter
npm ERR!   react-simple-typewriter@"^1.0.13" 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\Owner\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\Owner\AppData\Local\npm-cache\_logs\2021-05-11T19_07_29_767Z-debug.log

1 个答案:

答案 0 :(得分:0)

react-simple-typewriter 版本 1.0.13 需要版本 16.x,而您有版本 17.0.2

react-simple-typewriter 升级到支持 React 17.x 的版本(如果有)或将 React 降级到 16.x