title: how do i fix the upstream dependency error? i have tried doing npm install --legacy-peer-deps and npm install --force but that causes problems further
body: <p>This is the error I am getting(can someone please also explain to me why such errors are occurring and if there is a way to update the npm to the version of react I have.):</p>
  <pre><code>PS C:\Naman Kothari\udemy course\react\thelastone&gt; npm i react-tilt
  npm ERR! code ERESOLVE
  npm ERR! ERESOLVE unable to resolve dependency tree
  npm ERR!
  npm ERR! While resolving: thelastone@0.1.0
  npm ERR! Found: react@17.0.2
  npm ERR! node_modules/react
  npm ERR!   react@&quot;^17.0.2&quot; from the root project
  npm ERR!
  npm ERR! Could not resolve dependency:
  npm ERR! peer react@&quot;^15.0.0 || ^16.0.0-beta || ^16.0.0&quot; from react-tilt@0.1.4
  npm ERR! node_modules/react-tilt
  npm ERR!   react-tilt@&quot;*&quot; 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\namrata kothari\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\namrata kothari\AppData\Local\npm-cache\_logs\2021-04-24T15_15_44_230Z-debug.log
  </code></pre>
  <p><em><strong>This is my package.json</strong></em> (it mainly consists of all the packages that were default created when I installed the create-react-app npm).</p>
  <pre><code>{
    &quot;name&quot;: &quot;thelastone&quot;,
    &quot;version&quot;: &quot;0.1.0&quot;,
    &quot;private&quot;: true,
    &quot;dependencies&quot;: {
      &quot;@testing-library/jest-dom&quot;: &quot;^5.12.0&quot;,
      &quot;@testing-library/react&quot;: &quot;^11.2.6&quot;,
      &quot;@testing-library/user-event&quot;: &quot;^12.8.3&quot;,
      &quot;react&quot;: &quot;^17.0.2&quot;,
      &quot;react-dom&quot;: &quot;^17.0.2&quot;,
      &quot;react-scripts&quot;: &quot;4.0.3&quot;,
      &quot;tachyons&quot;: &quot;^4.12.0&quot;,
      &quot;web-vitals&quot;: &quot;^1.1.1&quot;
    },
    &quot;scripts&quot;: {
      &quot;start&quot;: &quot;react-scripts start&quot;,
      &quot;build&quot;: &quot;react-scripts build&quot;,
      &quot;test&quot;: &quot;react-scripts test&quot;,
      &quot;eject&quot;: &quot;react-scripts eject&quot;
    },
    &quot;eslintConfig&quot;: {
      &quot;extends&quot;: [
        &quot;react-app&quot;,
        &quot;react-app/jest&quot;
      ]
    },
    &quot;browserslist&quot;: {
      &quot;production&quot;: [
        &quot;&gt;0.2%&quot;,
        &quot;not dead&quot;,
        &quot;not op_mini all&quot;
      ],
      &quot;development&quot;: [
        &quot;last 1 chrome version&quot;,
        &quot;last 1 firefox version&quot;,
        &quot;last 1 safari version&quot;
      ]
    }
  }
  </code></pre>