[英]How Can I Resolve this error for Installing npm install --save react-html-table-to-excel this packages
I am getting this error for installing "npm install --save react-html-table-to-excel " this package.我在安装“npm install --save react-html-table-to-excel”这个 package 时收到此错误。
PS C:\Users\Dev03\OneDrive\Desktop\Project\usermanagement> npm install react-html-table-to-excel npm ERR: code ERESOLVE npm ERR. PS C:\Users\Dev03\OneDrive\Desktop\Project\usermanagement> npm 安装 react-html-table-to-excel npm ERR:代码 ERESOLVE npm ERR。 ERESOLVE unable to resolve dependency tree npm ERR.
ERESOLVE 无法解析依赖关系树 npm ERR。 While resolving: usermanagement@0.1.0 npm ERR.
解析时:usermanagement@0.1.0 npm ERR。 Found.
成立。 react@17:0.2 npm ERR.
反应@17:0.2 npm 错误。 node_modules/react npm ERR.
节点模块/反应 npm 错误。 react@"^17.0,2" from the root project npm ERR, npm ERR.
react@"^17.0,2" 来自根项目 npm ERR,npm ERR。 Could not resolve dependency: npm ERR.
无法解析依赖项:npm ERR。 peer react@"^15.x:x" from react-html-table-to-excel@2:0.0 npm ERR!
peer react@"^15.x:x" from react-html-table-to-excel@2:0.0 npm 错误! node_modules/react-html-table-to-excel npm ERR!
node_modules/react-html-table-to-excel npm 错误! react-html-table-to-excel@"*" from the root project npm ERR!
react-html-table-to-excel@"*" 来自根项目 npm ERR! npm ERR!
npm 错误! Fix the upstream dependency conflict, or retry npm ERR!
修复上游依赖冲突,或者重试 npm ERR! this command with --force, or --legacy-peer-deps npm ERR!
此命令带有 --force 或 --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
接受不正确(并且可能损坏)的依赖项解析。 npm ERR!
npm 错误! npm ERR!
npm 错误! See C:\Users\Dev03\AppData\Local\npm-cache\eresolve-report.txt for a full report.
有关完整报告,请参阅 C:\Users\Dev03\AppData\Local\npm-cache\eresolve-report.txt。 npm ERR!
npm 错误! A complete log of this run can be found in: npm ERR!
可以在以下位置找到此运行的完整日志:npm ERR! C:\Users\Dev03\AppData\Local\npm-cache_logs\2021-09-27T11_45_28_139Z-debug.log
C:\Users\Dev03\AppData\Local\npm-cache_logs\2021-09-27T11_45_28_139Z-debug.log
react-html-table-to-excel
requires react 15. react-html-table-to-excel
需要 React 15。
https://github.com/zsusac/ReactHTMLTableToExcel/blob/master/package.json#L42 https://github.com/zsusac/ReactHTMLTableToExcel/blob/master/package.json#L42
Either you will have to downgrade to react 15, or you could try to force the installation with the legacy-peer-deps
flag like this:要么你必须降级到 React 15,要么你可以尝试使用
legacy-peer-deps
标志强制安装,如下所示:
npm install react-html-table-to-excel --legacy-peer-deps
Try this:尝试这个:
npm install --save react-html-table-to-excel --legacy-peer-deps
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.