npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree 错误解决

报错:

F:\VSCode_Project\jetlinks-ui-antd-master>npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: jetlinks@1.9.0
npm ERR! Found: antd@3.26.20
npm ERR! node_modules/antd
npm ERR!   antd@"^3.26.18" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer antd@"4.x" from @ant-design/pro-layout@4.11.4
npm ERR! node_modules/@ant-design/pro-layout
npm ERR!   @ant-design/pro-layout@"^4.11.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 D:\soft\nodejs\node_cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     D:\soft\nodejs\node_cache\_logs\2021-03-22T02_10_01_880Z-debug.log

npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree  错误解决

原因分析

npm 版本太高,需要降低版本

解决方案

npm install npm@3.8.6 -g

问题解决!

上一篇:Ant Design Dynamic Runtime Theme


下一篇:antd Tree 组件封装自定义渲染