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: [email protected] npm ERR! Found: [email protected] 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 [email protected] 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
CodePudding user response:
Try this:
npm install --save react-html-table-to-excel --legacy-peer-deps
CodePudding user response:
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