Unable to resolve dependency tree Reactjs

$ npm install --save react-tinder-card --legacy-peer-deps

This error comes from version 7.x of npm.

Please try again with the --legacy-peer-deps option.


What this error basically says is that [email protected] in it's peer dependencies has react@"^16.8.0". So it needs that version of react to function properly. On your [email protected] application you currently have [email protected].

This problem can be solved manually by just installing version of react that [email protected] needs which is react@"^16.8.0", so you need to downgrade your version to run the package.

The --legacy-peer-deps flag was introduced with v7 of npm as a way to bypass peerDependency auto-installation; it tells NPM to ignore peer deps and proceed with the installation anyway. This can cause some unwanted behavior and I would not suggest it.