简体   繁体   中英

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.

PS C:\Users\Dev03\OneDrive\Desktop\Project\usermanagement> npm install react-html-table-to-excel npm ERR: code ERESOLVE npm ERR. ERESOLVE unable to resolve dependency tree npm ERR. While resolving: usermanagement@0.1.0 npm ERR. Found. react@17:0.2 npm ERR. node_modules/react npm ERR. react@"^17.0,2" from the root project npm ERR, npm ERR. Could not resolve dependency: npm ERR. peer react@"^15.x:x" from react-html-table-to-excel@2:0.0 npm ERR! node_modules/react-html-table-to-excel npm ERR! react-html-table-to-excel@"*" 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\Dev03\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\Dev03\AppData\Local\npm-cache_logs\2021-09-27T11_45_28_139Z-debug.log

react-html-table-to-excel requires react 15.

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:

npm install react-html-table-to-excel --legacy-peer-deps

Try this:

npm install --save react-html-table-to-excel --legacy-peer-deps

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM