简体   繁体   English

ERESOLVE 无法解析 redux 的依赖关系树

[英]ERESOLVE unable to resolve dependency tree for redux

I've tried with both --force and --legacy-peer-deps, but nothing seems to work.我已经尝试过 --force 和 --legacy-peer-deps,但似乎没有任何效果。 I'm currently using node@10.2.0 in macOS.我目前在 macOS 中使用 node@10.2.0 。

hiteshagarwal@Hiteshs-MBP kuber % npm i
(node:48924) ExperimentalWarning: The fs.promises API is experimental
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: redux@4.1.0
npm ERR! node_modules/redux
npm ERR!   redux@"^4.0.1" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer redux@"^2.0.0 || ^1.0.0" from redux-log-slow-reducers@0.0.2
npm ERR! node_modules/redux-log-slow-reducers
npm ERR!   redux-log-slow-reducers@"0.0.2" 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 /Users/hiteshagarwal/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/hiteshagarwal/.npm/_logs/2021-05-09T13_52_12_776Z-debug.log

After resolving the conflict issue with --legacy-peer-deps there was other many errors which were reflecting about node-gyp, gcc, const denominator, etc. It's resolved now.在用 --legacy-peer-deps 解决冲突问题后,还有其他许多错误反映在 node-gyp、gcc、const denominator 等方面。现在已经解决。 There was a conflict between the npm and node versions. npm 和节点版本之间存在冲突。 I was using node 10.2.0 with npm 5.2.0 and some node-gyp cache files were also there from node 16.* version which was the reasons.我正在使用节点 10.2.0 和 npm 5.2.0 并且节点 16.* 版本中也有一些节点 gyp 缓存文件,这就是原因。 I have cleaned the system with all the nvm, npm and node files and other caches and then reinstalled the node@10.2.0 from the web and it contains npm 5.6.* with which I was able to solve my issue.我已经用所有 nvm、npm 和节点文件和其他缓存清理了系统,然后从 web 重新安装了 node@10.2.0,它包含 ZBB30E85411B56DF41296726AB445DCF8 能够解决我的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM