title: react native ERESOLVE unable to resolve dependency tree
body: <p>The react-native android APP, that I am developping in windows local environment started to stop building a few days ago.  I had warnings about jcenter() being deprecated, which I replaced with maven.  I also had issues related to Slider by react native community,... Finally, I decided to delete files within node_modules, and rebuild them.  Unfortunately, I still had dependencies issues while trying to rebuild.  Anyone can tell me what is wrong, and how to solve it?</p>
  <p>Here are the debug log and the APP's package.json:</p>
  <p>[Building dependencies error][1]</p>
  <p>debug log:</p>
  <pre><code># npm resolution error report
  
  While resolving: AwesomeProject@0.0.1
  Found: react@17.0.1
  node_modules/react
    react@&quot;^17.0.1&quot; from the root project
    peer react@&quot;*&quot; from @react-native-community/slider@4.1.7
    node_modules/@react-native-community/slider
      @react-native-community/slider@&quot;^4.1.7&quot; from the root project
    peer react@&quot;17.0.1&quot; from react-native@0.64.2
    node_modules/react-native
      react-native@&quot;^0.64.2&quot; from the root project
      peer react-native@&quot;*&quot; from @react-native-community/slider@4.1.7
      node_modules/@react-native-community/slider
        @react-native-community/slider@&quot;^4.1.7&quot; from the root project
  
  Could not resolve dependency:
  peer react@&quot;17.0.2&quot; from react-native-windows@0.65.3
  node_modules/react-native-windows
    peer react-native-windows@&quot;*&quot; from @react-native-community/slider@4.1.7
    node_modules/@react-native-community/slider
      @react-native-community/slider@&quot;^4.1.7&quot; from the root project
  
  Fix the upstream dependency conflict, or retry
  this command with --force, or --legacy-peer-deps
  to accept an incorrect (and potentially broken) dependency resolution.
  
  Raw JSON explanation object:
  
  {
    &quot;code&quot;: &quot;ERESOLVE&quot;,
    &quot;current&quot;: {
      &quot;name&quot;: &quot;react&quot;,
      &quot;version&quot;: &quot;17.0.1&quot;,
      &quot;whileInstalling&quot;: {
        &quot;name&quot;: &quot;AwesomeProject&quot;,
        &quot;version&quot;: &quot;0.0.1&quot;,
        &quot;path&quot;: &quot;C:\\Users\\pascal\\Desktop\\AwesomeProject2&quot;
      },
      &quot;location&quot;: &quot;node_modules/react&quot;,
      &quot;isWorkspace&quot;: false,
      &quot;dependents&quot;: [
        {
          &quot;type&quot;: &quot;prod&quot;,
          &quot;name&quot;: &quot;react&quot;,
          &quot;spec&quot;: &quot;^17.0.1&quot;,
          &quot;from&quot;: {
            &quot;location&quot;: &quot;C:\\Users\\pascal\\Desktop\\AwesomeProject2&quot;
          }
        },
        {
          &quot;type&quot;: &quot;peer&quot;,
          &quot;name&quot;: &quot;react&quot;,
          &quot;spec&quot;: &quot;*&quot;,
          &quot;from&quot;: {
            &quot;name&quot;: &quot;@react-native-community/slider&quot;,
            &quot;version&quot;: &quot;4.1.7&quot;,
            &quot;whileInstalling&quot;: {
              &quot;name&quot;: &quot;AwesomeProject&quot;,
              &quot;version&quot;: &quot;0.0.1&quot;,
              &quot;path&quot;: &quot;C:\\Users\\pascal\\Desktop\\AwesomeProject2&quot;
            },
            &quot;location&quot;: &quot;node_modules/@react-native-community/slider&quot;,
            &quot;isWorkspace&quot;: false,
            &quot;dependents&quot;: [
              {
                &quot;type&quot;: &quot;prod&quot;,
                &quot;name&quot;: &quot;@react-native-community/slider&quot;,
                &quot;spec&quot;: &quot;^4.1.7&quot;,
                &quot;from&quot;: {
                  &quot;location&quot;: &quot;C:\\Users\\pascal\\Desktop\\AwesomeProject2&quot;
                }
              }
            ]
          }
        },
        {
          &quot;type&quot;: &quot;peer&quot;,
          &quot;name&quot;: &quot;react&quot;,
          &quot;spec&quot;: &quot;17.0.1&quot;,
          &quot;from&quot;: {
            &quot;name&quot;: &quot;react-native&quot;,
            &quot;version&quot;: &quot;0.64.2&quot;,
            &quot;whileInstalling&quot;: {
              &quot;name&quot;: &quot;AwesomeProject&quot;,
              &quot;version&quot;: &quot;0.0.1&quot;,
              &quot;path&quot;: &quot;C:\\Users\\pascal\\Desktop\\AwesomeProject2&quot;
            },
            &quot;location&quot;: &quot;node_modules/react-native&quot;,
            &quot;isWorkspace&quot;: false,
            &quot;dependents&quot;: [
              {
                &quot;type&quot;: &quot;prod&quot;,
                &quot;name&quot;: &quot;react-native&quot;,
                &quot;spec&quot;: &quot;^0.64.2&quot;,
                &quot;from&quot;: {
                  &quot;location&quot;: &quot;C:\\Users\\pascal\\Desktop\\AwesomeProject2&quot;
                }
              },
              {
                &quot;type&quot;: &quot;peer&quot;,
                &quot;name&quot;: &quot;react-native&quot;,
                &quot;spec&quot;: &quot;*&quot;,
                &quot;from&quot;: {
                  &quot;name&quot;: &quot;@react-native-community/slider&quot;,
                  &quot;version&quot;: &quot;4.1.7&quot;,
                  &quot;whileInstalling&quot;: {
                    &quot;name&quot;: &quot;AwesomeProject&quot;,
                    &quot;version&quot;: &quot;0.0.1&quot;,
                    &quot;path&quot;: &quot;C:\\Users\\pascal\\Desktop\\AwesomeProject2&quot;
                  },
                  &quot;location&quot;: &quot;node_modules/@react-native-community/slider&quot;,
                  &quot;isWorkspace&quot;: false,
                  &quot;dependents&quot;: [
                    {
                      &quot;type&quot;: &quot;prod&quot;,
                      &quot;name&quot;: &quot;@react-native-community/slider&quot;,
                      &quot;spec&quot;: &quot;^4.1.7&quot;,
                      &quot;from&quot;: {
                        &quot;location&quot;: &quot;C:\\Users\\pascal\\Desktop\\AwesomeProject2&quot;
                      }
                    }
                  ]
                }
              }
            ]
          }
        }
      ]
    },
    &quot;currentEdge&quot;: {
      &quot;type&quot;: &quot;prod&quot;,
      &quot;name&quot;: &quot;react&quot;,
      &quot;spec&quot;: &quot;^17.0.1&quot;,
      &quot;from&quot;: {
        &quot;location&quot;: &quot;C:\\Users\\pascal\\Desktop\\AwesomeProject2&quot;
      }
    },
    &quot;edge&quot;: {
      &quot;type&quot;: &quot;peer&quot;,
      &quot;name&quot;: &quot;react&quot;,
      &quot;spec&quot;: &quot;17.0.2&quot;,
      &quot;error&quot;: &quot;INVALID&quot;,
      &quot;from&quot;: {
        &quot;name&quot;: &quot;react-native-windows&quot;,
        &quot;version&quot;: &quot;0.65.3&quot;,
        &quot;whileInstalling&quot;: {
          &quot;name&quot;: &quot;AwesomeProject&quot;,
          &quot;version&quot;: &quot;0.0.1&quot;,
          &quot;path&quot;: &quot;C:\\Users\\pascal\\Desktop\\AwesomeProject2&quot;
        },
        &quot;location&quot;: &quot;node_modules/react-native-windows&quot;,
        &quot;isWorkspace&quot;: false,
        &quot;dependents&quot;: [
          {
            &quot;type&quot;: &quot;peer&quot;,
            &quot;name&quot;: &quot;react-native-windows&quot;,
            &quot;spec&quot;: &quot;*&quot;,
            &quot;from&quot;: {
              &quot;name&quot;: &quot;@react-native-community/slider&quot;,
              &quot;version&quot;: &quot;4.1.7&quot;,
              &quot;whileInstalling&quot;: {
                &quot;name&quot;: &quot;AwesomeProject&quot;,
                &quot;version&quot;: &quot;0.0.1&quot;,
                &quot;path&quot;: &quot;C:\\Users\\pascal\\Desktop\\AwesomeProject2&quot;
              },
              &quot;location&quot;: &quot;node_modules/@react-native-community/slider&quot;,
              &quot;isWorkspace&quot;: false,
              &quot;dependents&quot;: [
                {
                  &quot;type&quot;: &quot;prod&quot;,
                  &quot;name&quot;: &quot;@react-native-community/slider&quot;,
                  &quot;spec&quot;: &quot;^4.1.7&quot;,
                  &quot;from&quot;: {
                    &quot;location&quot;: &quot;C:\\Users\\pascal\\Desktop\\AwesomeProject2&quot;
                  }
                }
              ]
            }
          }
        ]
      }
    },
    &quot;strictPeerDeps&quot;: false,
    &quot;force&quot;: false
  }
  </code></pre>
  <p>APP's package.json:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>{
    "name": "AwesomeProject",
    "version": "0.0.1",
    "private": true,
    "scripts": {
      "android": "react-native run-android",
      "ios": "react-native run-ios",
      "start": "react-native start",
      "test": "jest",
      "lint": "eslint ."
    },
    "dependencies": {
      "@react-native-community/masked-view": "^0.1.11",
      "@react-native-community/slider": "^4.1.7",
      "@react-native-masked-view/masked-view": "^0.2.4",
      "@react-navigation/bottom-tabs": "^5.11.11",
      "@react-navigation/material-bottom-tabs": "^5.3.15",
      "@react-navigation/native": "^5.9.4",
      "@react-navigation/stack": "^5.14.5",
      "axios": "^0.21.1",
      "formik": "^2.2.9",
      "npm": "^7.15.1",
      "react": "^16.0.4",
      "react-dom": "^16.0.4",
      "react-native": "^0.64.2",
      "react-native-awesome-alerts": "^1.5.2",
      "react-native-base64": "^0.2.1",
      "react-native-camera": "^3.44.1",
      "react-native-color": "^0.0.10",
      "react-native-config": "^1.4.2",
      "react-native-flash-message": "^0.1.23",
      "react-native-gesture-handler": "^1.10.3",
      "react-native-image-crop-picker": "^0.36.2",
      "react-native-in-app-message": "^1.0.32",
      "react-native-modal": "^12.0.3",
      "react-native-paper": "^4.9.2",
      "react-native-permissions": "^2.2.2",
      "react-native-qrcode-generator": "^1.2.2",
      "react-native-qrcode-scanner": "^1.5.4",
      "react-native-safe-area-context": "^3.2.0",
      "react-native-screens": "^3.4.0",
      "react-native-vector-icons": "^8.1.0",
      "react-native-webview": "^11.6.4",
      "realm": "^10.6.0",
      "rn-fetch-blob": "^0.12.0",
      "styled-components": "^5.3.0",
      "yarn": "^1.22.10",
      "yup": "^0.32.9"
    },
    "devDependencies": {
      "@babel/core": "^7.14.3",
      "@babel/runtime": "^7.14.0",
      "@react-native-community/eslint-config": "^2.0.0",
      "babel-jest": "^27.0.2",
      "eslint": "^7.28.0",
      "jest": "^27.0.4",
      "metro-react-native-babel-preset": "^0.66.0",
      "react-test-renderer": "16.0.4"
    },
    "jest": {
      "preset": "react-native"
    }
  }</code></pre>
  </div>
  </div>
  </p>
  <p>[...errors trying to resolve dependencies after deleting 'node_modules' contents][1]
  [1]: https://i.stack.imgur.com/oSwEm.png</p>
  <p>[...errors after yarn, cd android, gradlew clean, cd.., npx react-native run-android][2]<br />
  [2]: https://i.stack.imgur.com/4TFtV.png</p>