【发布时间】:2021-05-12 01:17:42
【问题描述】:
所以我从 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 。似乎没有任何效果。
【问题讨论】:
-
删除 node_models 文件夹和 packge-lock.json 并运行 npm i
-
你有什么
node-sass和节点版本?
标签: javascript node.js reactjs npm