When I ran the below command, I got the above error message.
npm install @material-ui/core
Solution:
This happens when you are trying to clone a project which is built a long time ago, and project dependencies have moved on to newer versions.
Just run below code. Works fine for me every time.
npm install –save react-tinder-card –legacy-peer-deps
Downgrade to npm v6. It should fix the issue.
npm install -g npm@6
Reference: https://stackoverflow.com/questions/64718633/unable-to-resolve-dependency-tree-reactjs