0

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

1
  • react-html-table-to-excel has peer dependency of react 15.x but you have react 17.x installed. Either downgrade your react (not recommended, other packages will run into issues if you have more), or use another package as it is outdated. Commented Sep 27, 2021 at 11:59

2 Answers 2

0

Try this:

npm install --save react-html-table-to-excel --legacy-peer-deps
Sign up to request clarification or add additional context in comments.

1 Comment

Yes...Now Its Working...Thank You @Izhan Yameen
0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.