title: How can I fix ERESOLVE unable to resolve dependency tree for npm install
body: <p>I am relatively new to angular and self learning currently. Previously everthing was working fine up untill i decided to import a lot of new things in my project. Small story short i found that i can delete node_modules and run npm install. after deleting it i am getting the below error when i run npm install.</p>
  <pre><code>npm ERR! ERESOLVE unable to resolve dependency tree
  npm ERR!
  npm ERR! While resolving: appla-katta@0.0.0
  npm ERR! Found: @angular/common@12.2.16
  npm ERR! node_modules/@angular/common
  npm ERR!   @angular/common@&quot;~12.2.0&quot; from the root project
  npm ERR!
  npm ERR! Could not resolve dependency:
  npm ERR! peer @angular/common@&quot;^14.0.0 || ^15.0.0&quot; from @angular/cdk@14.0.2
  npm ERR! node_modules/@angular/cdk
  npm ERR!   @angular/cdk@&quot;14.0.2&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\kavis\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\kavis\AppData\Local\npm-cache\_logs\2022-06-20T10_45_13_413Z-debug-0.log```
  
  
  Not sure what the error exactly means, but i think i have different versions becuase of which dependency error is there i think. I tried running npm install @angular/cdk@latest and  ng update @angular/common but no results. I even found some more solutions like deleting node modules, package_lock.json but the npm install doesnt work.
  
  I tried to force npm install but then my project doesnt run because of some other reason
  so i was hoping to resolve the error over here itself
  
  Thanks
  
  Below is my package.json content
  
  ```{
    &quot;name&quot;: &quot;appla-katta&quot;,
    &quot;version&quot;: &quot;0.0.0&quot;,
    &quot;scripts&quot;: {
      &quot;ng&quot;: &quot;ng&quot;,
      &quot;start&quot;: &quot;ng serve&quot;,
      &quot;build&quot;: &quot;node build &amp;&amp; firebase deploy&quot;,
      &quot;watch&quot;: &quot;ng build --watch --configuration development&quot;,
      &quot;test&quot;: &quot;ng test&quot;
    },
    
    &quot;private&quot;: true,
    &quot;dependencies&quot;: {
      &quot;@angular/animations&quot;: &quot;~12.2.0&quot;,
      &quot;@angular/cdk&quot;: &quot;^13.3.2&quot;,
      &quot;@angular/common&quot;: &quot;~12.2.0&quot;,
      &quot;@angular/compiler&quot;: &quot;~12.2.0&quot;,
      &quot;@angular/core&quot;: &quot;~12.2.0&quot;,
      &quot;@angular/fire&quot;: &quot;github:angular/fire&quot;,
      &quot;@angular/flex-layout&quot;: &quot;^13.0.0-beta.38&quot;,
      &quot;@angular/forms&quot;: &quot;~12.2.0&quot;,
      &quot;@angular/material&quot;: &quot;^13.3.2&quot;,
      &quot;@angular/platform-browser&quot;: &quot;~12.2.0&quot;,
      &quot;@angular/platform-browser-dynamic&quot;: &quot;~12.2.0&quot;,
      &quot;@angular/router&quot;: &quot;~12.2.0&quot;,
      &quot;@auth0/auth0-angular&quot;: &quot;^1.9.0&quot;,
      &quot;@fortawesome/fontawesome-free&quot;: &quot;^6.1.1&quot;,
      &quot;angularfire2&quot;: &quot;^5.4.2&quot;,
      &quot;bootstrap&quot;: &quot;^5.1.3&quot;,
      &quot;cors&quot;: &quot;^2.8.5&quot;,
      &quot;firebase&quot;: &quot;^7.24.0&quot;,
      &quot;json-server&quot;: &quot;^0.17.0&quot;,
      &quot;rxjs&quot;: &quot;~6.6.0&quot;,
      &quot;tslib&quot;: &quot;^2.3.0&quot;,
      &quot;zone.js&quot;: &quot;~0.11.4&quot;
    },
    &quot;devDependencies&quot;: {
      &quot;@angular-devkit/build-angular&quot;: &quot;~12.2.7&quot;,
      &quot;@angular/cli&quot;: &quot;~12.2.7&quot;,
      &quot;@angular/compiler-cli&quot;: &quot;~12.2.0&quot;,
      &quot;@types/jasmine&quot;: &quot;~3.8.0&quot;,
      &quot;@types/node&quot;: &quot;^12.11.1&quot;,
      &quot;jasmine-core&quot;: &quot;~3.8.0&quot;,
      &quot;karma&quot;: &quot;~6.3.0&quot;,
      &quot;karma-chrome-launcher&quot;: &quot;~3.1.0&quot;,
      &quot;karma-coverage&quot;: &quot;~2.0.3&quot;,
      &quot;karma-jasmine&quot;: &quot;~4.0.0&quot;,
      &quot;karma-jasmine-html-reporter&quot;: &quot;~1.7.0&quot;,
      &quot;typescript&quot;: &quot;~4.3.5&quot;
    }
  }
  </code></pre>
  <p>also i had package-lock.json which i have now remove</p>