title: install angular library - unable to resolve dependency tree
body: <p>Some time ago I've pulled my generic code from my angular application into libraries. Now it seems that I'm unable to install a library targetting <code>@angular/core@13.1</code> into a newly created application which also targets 13.1.</p>
  <p>Library <a href="https://github.com/MintPlayer/mintplayer-ng-bootstrap/blob/master/libs/mintplayer-ng-animations/package.json" rel="nofollow noreferrer"><code>package.json</code></a></p>
  <pre><code>{
    &quot;name&quot;: &quot;@xxx/ng-animations&quot;,
    &quot;private&quot;: false,
    &quot;version&quot;: &quot;13.1.3&quot;,
    &quot;peerDependencies&quot;: {
      &quot;@angular/common&quot;: &quot;^13.1.0&quot;,
      &quot;@angular/core&quot;: &quot;^13.1.0&quot;
    },
    &quot;dependencies&quot;: {
      &quot;tslib&quot;: &quot;^2.3.0&quot;
    }
  }
  </code></pre>
  <p>Brand new application <code>package.json</code></p>
  <pre><code>{
    ...,
    &quot;dependencies&quot;: {
      &quot;@angular/animations&quot;: &quot;~13.1.0&quot;,
      &quot;@angular/common&quot;: &quot;~13.1.0&quot;,
      &quot;@angular/compiler&quot;: &quot;~13.1.0&quot;,
      &quot;@angular/core&quot;: &quot;~13.1.0&quot;,
      &quot;@angular/forms&quot;: &quot;~13.1.0&quot;,
      &quot;@angular/platform-browser&quot;: &quot;~13.1.0&quot;,
      &quot;@angular/platform-browser-dynamic&quot;: &quot;~13.1.0&quot;,
      &quot;@angular/router&quot;: &quot;~13.1.0&quot;,
      &quot;rxjs&quot;: &quot;~7.4.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;~13.1.3&quot;,
      &quot;@angular/cli&quot;: &quot;~13.1.3&quot;,
      &quot;@angular/compiler-cli&quot;: &quot;~13.1.0&quot;,
      &quot;@types/jasmine&quot;: &quot;~3.10.0&quot;,
      &quot;@types/node&quot;: &quot;^12.11.1&quot;,
      &quot;jasmine-core&quot;: &quot;~3.10.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.1.0&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.5.2&quot;
    }
  }
  </code></pre>
  <p>Somehow this causes the following version conflict error which I'm unable to resolve (I resolved some of these in the past)</p>
  <pre><code>npm i @mintplayer/ng-animations
  npm ERR! code ERESOLVE
  npm ERR! ERESOLVE unable to resolve dependency tree
  npm ERR!
  npm ERR! While resolving: tada@0.0.0
  npm ERR! Found: @angular/core@13.1.1
  npm ERR! node_modules/@angular/core
  npm ERR!   @angular/core@&quot;~13.1.0&quot; from the root project
  npm ERR!   peer @angular/core@&quot;^13.1.0&quot; from @mintplayer/ng-animations@13.1.3
  npm ERR!   node_modules/@mintplayer/ng-animations
  npm ERR!     @mintplayer/ng-animations@&quot;*&quot; from the root project
  npm ERR!   1 more (@angular/animations)
  npm ERR!
  npm ERR! Could not resolve dependency:
  npm ERR! peer @angular/core@&quot;13.1.2&quot; from @angular/common@13.1.2
  npm ERR! node_modules/@angular/common
  npm ERR!   @angular/common@&quot;~13.1.0&quot; from the root project
  npm ERR!   peer @angular/common@&quot;^13.1.0&quot; from @mintplayer/ng-animations@13.1.3
  npm ERR!   node_modules/@mintplayer/ng-animations
  npm ERR!     @mintplayer/ng-animations@&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.
  </code></pre>
  <p>I'm on the latest version of angular:</p>
  <pre><code>&gt; ng version
  
  Angular CLI: 13.1.3
  Node: 14.18.2
  Package Manager: npm 8.3.0
  OS: win32 x64
  
  Angular: 13.1.2
  ... animations, common, compiler, compiler-cli, core, forms
  ... platform-browser, platform-browser-dynamic, router
  
  Package                         Version
  ---------------------------------------------------------
  @angular-devkit/architect       0.1301.3
  @angular-devkit/build-angular   13.1.3
  @angular-devkit/core            13.1.3
  @angular-devkit/schematics      13.1.3
  @angular/cli                    13.1.3
  @schematics/angular             13.1.3
  rxjs                            7.4.0
  typescript                      4.5.4
  
  &gt; node -v
  v14.18.2
  
  &gt; npm -v
  8.3.0
  </code></pre>
  <p>I had a similar problem some time ago, but that was when I was upgrading my application from angular 11 to 13, and I was able to solve it by checking the versions of the specific package npm was complaining about. But now all versions are the same (13.x.x or 13.1.x).</p>
  <p>Everything is targetting angular 13.1, so where does this error come from? Any help is highly appreciated.</p>