简体   繁体   中英

ERESOLVE unable to resolve dependency tree for redux

I've tried with both --force and --legacy-peer-deps, but nothing seems to work. I'm currently using node@10.2.0 in macOS.

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. There was a conflict between the npm and node versions. 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. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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