npm install antd --save出现错误ERESOLVE unable to resolve dependency

发布于 2022-09-12 22:34:39 字数 5140 浏览 8 评论 0

node js v13.14.0

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: first_ble_demo@0.0.1
npm ERR! Found: react@16.13.1
npm ERR! node_modules/react
npm ERR! react@"16.13.1" from the root project
npm ERR! peer react@">=16.9.0" from antd@4.12.3
npm ERR! node_modules/antd
npm ERR! antd@"*" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"17.0.1" from react-dom@17.0.1
npm ERR! node_modules/react-dom
npm ERR! peer react-dom@">=16.9.0" from antd@4.12.3
npm ERR! node_modules/antd
npm ERR! antd@"*" 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\Administrator.USER-20191030HC\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\Administrator.USER-20191030HC\AppData\Local\npm-cache\_logs\2021-02-26T08_10_44_371Z-debug.log
————————————————————————————————————————————————————————————————————————————
http fetch GET 304 https://registry.npm.taobao.o... 528ms (from cache)
28 silly fetch manifest react@16.13.1
29 http fetch GET 304 https://registry.npm.taobao.o... 27ms (from cache)
30 silly fetch manifest react-dom@>=16.9.0
31 http fetch GET 304 https://registry.npm.taobao.o... 24ms (from cache)
32 timing idealTree Completed in 1183ms
33 timing command:install Completed in 1197ms
34 verbose stack Error: unable to resolve dependency tree
34 verbose stack at Arborist.[failPeerConflict] (C:\Users\Administrator.USER-20191030HC\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:1136:25)
34 verbose stack at Arborist.[loadPeerSet] (C:\Users\Administrator.USER-20191030HC\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:1129:30)
34 verbose stack at Arborist.[nodeFromEdge] (C:\Users\Administrator.USER-20191030HC\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:927:30)
34 verbose stack at async Arborist.[loadPeerSet] (C:\Users\Administrator.USER-20191030HC\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:1092:11)
34 verbose stack at async Arborist.[buildDepStep] (C:\Users\Administrator.USER-20191030HC\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:834:11)
34 verbose stack at async Arborist.buildIdealTree (C:\Users\Administrator.USER-20191030HC\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:209:7)
34 verbose stack at async Promise.all (index 1)
34 verbose stack at async Arborist.reify (C:\Users\Administrator.USER-20191030HC\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\reify.js:127:5)
34 verbose stack at async install (C:\Users\Administrator.USER-20191030HC\AppData\Roaming\npm\node_modules\npm\lib\install.js:38:3)
35 verbose cwd D:\rn\first_ble_demo
36 verbose Windows_NT 6.1.7601
37 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Users\Administrator.USER-20191030HC\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "install" "antd"
38 verbose node v12.10.0
39 verbose npm v7.5.4
40 error code ERESOLVE
41 error ERESOLVE unable to resolve dependency tree
42 error
43 error While resolving: [1mfirst_ble_demo[22m@[1m0.0.1[22m
43 error Found: [1mreact[22m@[1m16.13.1[22m[2m[22m
43 error [2mnode_modules/react[22m
43 error [1mreact[22m@"[1m16.13.1[22m" from the root project
43 error [35mpeer[39m [1mreact[22m@"[1m>=16.9.0[22m" from [1mantd[22m@[1m4.12.3[22m[2m[22m
43 error [2mnode_modules/antd[22m
43 error [1mantd[22m@"[1m*[22m" from the root project
43 error
43 error Could not resolve dependency:
43 error [35mpeer[39m [1mreact[22m@"[1m17.0.1[22m" from [1mreact-dom[22m@[1m17.0.1[22m[2m[22m
43 error [2mnode_modules/react-dom[22m
43 error [35mpeer[39m [1mreact-dom[22m@"[1m>=16.9.0[22m" from [1mantd[22m@[1m4.12.3[22m[2m[22m
43 error [2mnode_modules/antd[22m
43 error [1mantd[22m@"[1m*[22m" from the root project
43 error
43 error Fix the upstream dependency conflict, or retry
43 error this command with --force, or --legacy-peer-deps
43 error to accept an incorrect (and potentially broken) dependency resolution.
43 error
43 error See C:\Users\Administrator.USER-20191030HC\AppData\Local\npm-cache\eresolve-report.txt for a full report.
44 verbose exit 1

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文