简体   繁体   English

我如何解决安装 npm install --save react-html-table-to-excel 这个包的错误

[英]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.

相关问题 安装 React 后如何修复此 npm 启动错误? - How can I fix this npm start error after installing React? 在 Mac 上使用命令 'sudo npm install electron -g' 在 Mac 上安装 Electron 后如何修复此错误 - How can I fix this error after installing Electron on Mac with command 'sudo npm install electron -g' 如何在 npm install 中克服这个错误? - How can I ovecome this error in npm install? 如何修复此错误我正在通过编写 npm install express --save on vs code terminal 来安装 express。我正在尝试在 E 上安装 - How to fix this error i am getting on installing express by writing npm install express --save on vs code terminal.i am trying to install on E 如果我使用“ npm install --save-dev”进行NPM安装,如何检查更新 - If I do an NPM install with “npm install --save-dev” how can I check for updates “npm install”不安装任何库。 如何解决这个问题? - “npm install” not installing any library. How to resolve this issue? 通过npm install安装时出错 - Error installing via npm install 在 html 中使用 react 时如何使用 npm 包? - How to use the npm packages while using react in html? 如何在不使用任何 npm 包的情况下在本机反应中制作自定义轮播或图像幻灯片 - how can I make a custom carousel or image slide in react native without using any npm packages 在Laravel中安装后如何要求npm包? - How to require npm packages after installing it in Laravel?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM