0

Im trying to install react input switch but i keep getting this error:

gomer@Gomers-MBP reactdentonline % npm install react-input-switch --save
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: reactdentonline@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@"^16.6.3" from react-input-switch@2.2.2
npm ERR! node_modules/react-input-switch
npm ERR!   react-input-switch@"*" 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 /Users/gomer/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/gomer/.npm/_logs/2021-05-22T13_14_14_559Z-debug.log
gomer@Gomers-MBP reactdentonline % 

Any idea what is wrong cause i dont want to use force.

Mr.Gomer
  • 501
  • 5
  • 14
  • Does this answer your question? [Unable to resolve dependency tree error when installing npm packages](https://stackoverflow.com/questions/64573177/unable-to-resolve-dependency-tree-error-when-installing-npm-packages) – Seblor May 22 '21 at 13:20
  • Well id say now. From what i understand my version of react would need downgrading but that could cause issues with the rest of the project i believe. – Mr.Gomer May 22 '21 at 13:23
  • 1
    Downgrade the version of React or Use a react-input-switch's version which works with React 17. – Ajeet Shah May 22 '21 at 15:12
  • guess thats my only choice i just did that and ran into a wrold of problems. but thx anyway. – Mr.Gomer May 22 '21 at 16:00

0 Answers0