gpt4 book ai didi

javascript - npm install 无法解析依赖树

转载 作者:行者123 更新时间:2023-12-04 01:07:01 30 4
gpt4 key购买 nike

所以我从 Creative Tim 的网站上购买了高级仪表板主题,现在当我尝试使用它时,我无法安装这些软件包。当我运行 npm install我收到以下错误:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: argon-dashboard-pro-react@1.2.0
npm ERR! Found: react@17.0.1
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.3.0" from react-bootstrap-table-next@4.0.3
npm ERR! node_modules/react-bootstrap-table-next
npm ERR! react-bootstrap-table-next@"4.0.3" 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\acer\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\acer\AppData\Local\npm-cache\_logs\2021-02-08T12_06_48_302Z-debug.log

如何修复此错误。我也尝试过 --legacy-peer-deps 和 --force 。似乎没有任何效果。

最佳答案

我遇到了这个问题,两种解决方案中的任何一种都对我有用。他们是:

  • npm install --legacy-peer-deps如果您好奇它的作用是什么?
    软件包将使用 --legacy 标志安装。该命令忽略所有
    安装时的对等依赖项,以 npm 版本 4 的样式通过
    版本 6。
  • 此错误来自 npm 的 7.x 版本。因此,另一种解决方案是
    降级到 npm 6.x。

  • 引用: Refer this for more info

    关于javascript - npm install 无法解析依赖树,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66101540/

    30 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com