title: NCU (npm-check-update) updating angular packages fails
body: <p>So trying to update everything to this day, i used the following commands:</p>
  <pre><code>  G:\Projects\salarkazazi&gt; npm i -g npm-check-updates
  </code></pre>
  <p>this was the output:</p>
  <pre><code>npm WARN deprecated har-validator@5.1.5: this library is no longer supported
  npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain 
  circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
  npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142      
  
  changed 313 packages, and audited 314 packages in 41s
  
  28 packages are looking for funding
    run `npm fund` for details
  
  found 0 vulnerabilities
  </code></pre>
  <p>then:</p>
  <pre><code>PS G:\Projects\salarkazazi&gt; ncu -u
  </code></pre>
  <p>it showed 2 major updates and typescript minor version update:</p>
  <pre><code>Upgrading G:\Projects\salarkazazi\package.json
  [====================] 25/25 100%
  
   @angular-devkit/build-angular       ~12.2.2  →  ~12.2.3     
   @angular/cli                        ~12.2.2  →  ~12.2.3
   @angular/compiler-cli               ~12.2.0  →  ~12.2.3
   @types/jasmine                       ~3.8.0  →   ~3.8.2
   @types/node                        ^12.11.1  →  ^16.7.6
   jasmine-core                         ~3.8.0  →   ~3.9.0
   karma                                ~6.3.0  →   ~6.3.4
   typescript                           ~4.3.5  →   ~4.4.2
   @angular/animations                 ~12.2.0  →  ~12.2.3
   @angular/common                     ~12.2.0  →  ~12.2.3
   @angular/compiler                   ~12.2.0  →  ~12.2.3
   @angular/core                       ~12.2.0  →  ~12.2.3
   @angular/forms                      ~12.2.0  →  ~12.2.3
   @angular/platform-browser           ~12.2.0  →  ~12.2.3
   @angular/platform-browser-dynamic   ~12.2.0  →  ~12.2.3
   @angular/router                     ~12.2.0  →  ~12.2.3
   rxjs                                 ~6.6.0  →   ~7.3.0
   tslib                                ^2.3.0  →   ^2.3.1
  
  Run npm install to install new versions.
  </code></pre>
  <p>so when i try to install the updates i get the following error:</p>
  <pre><code>PS G:\Projects\salarkazazi&gt; npm install
  npm ERR! code ERESOLVE
  npm ERR! ERESOLVE unable to resolve dependency tree
  npm ERR!
  npm ERR! While resolving: salarkazazi@0.0.0
  npm ERR! Found: typescript@4.4.2
  npm ERR! node_modules/typescript
  npm ERR!   dev typescript@&quot;~4.4.2&quot; from the root project
  npm ERR!
  npm ERR! Could not resolve dependency:
  npm ERR! peer typescript@&quot;&gt;=4.2.3 &lt;4.4&quot; from @angular/compiler-cli@12.2.3
  npm ERR! node_modules/@angular/compiler-cli
  npm ERR!   dev @angular/compiler-cli@&quot;~12.2.3&quot; from the root project
  npm ERR!   peer @angular/compiler-cli@&quot;^12.0.0&quot; from @angular-devkit/build-angular@12.2.3
  npm ERR!   node_modules/@angular-devkit/build-angular
  npm ERR!     dev @angular-devkit/build-angular@&quot;~12.2.3&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\Salar\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\Salar\AppData\Local\npm-cache\_logs\2021-08-30T08_03_27_428Z-debug.log
  </code></pre>
  <p>this is the log file:</p>
  <pre><code>0 verbose cli [
  0 verbose cli   'G:\\Program Files\\nodejs\\node.exe',
  0 verbose cli   'C:\\Users\\Salar\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
  0 verbose cli   'install'
  0 verbose cli ]
  1 info using npm@7.21.0
  2 info using node@v14.17.5
  3 timing npm:load:whichnode Completed in 0ms
  4 timing config:load:defaults Completed in 2ms
  5 timing config:load:file:C:\Users\Salar\AppData\Roaming\npm\node_modules\npm\npmrc Completed in 11ms
  6 timing config:load:builtin Completed in 11ms
  7 timing config:load:cli Completed in 2ms
  8 timing config:load:env Completed in 0ms
  9 timing config:load:file:G:\Projects\salarkazazi\.npmrc Completed in 0ms
  10 timing config:load:project Completed in 1ms
  11 timing config:load:file:C:\Users\Salar\.npmrc Completed in 0ms
  12 timing config:load:user Completed in 0ms
  13 timing config:load:file:C:\Users\Salar\AppData\Roaming\npm\etc\npmrc Completed in 0ms
  14 timing config:load:global Completed in 1ms
  15 timing config:load:validate Completed in 0ms
  16 timing config:load:credentials Completed in 1ms
  17 timing config:load:setEnvs Completed in 1ms
  18 timing config:load Completed in 19ms
  19 timing npm:load:configload Completed in 19ms
  20 timing npm:load:setTitle Completed in 0ms
  21 timing npm:load:setupLog Completed in 0ms
  22 timing config:load:flatten Completed in 3ms
  23 timing npm:load:cleanupLog Completed in 3ms
  24 timing npm:load:configScope Completed in 0ms
  25 timing npm:load:projectScope Completed in 2ms
  26 timing npm:load Completed in 29ms
  27 timing arborist:ctor Completed in 1ms
  28 timing idealTree:init Completed in 948ms
  29 timing idealTree:userRequests Completed in 1ms
  30 silly idealTree buildDeps
  31 silly fetch manifest @angular/animations@~12.2.3
  32 http fetch GET 200 https://registry.npmjs.org/@angular%2fanimations 1255ms (cache revalidated)
  33 silly fetch manifest @angular/core@~12.2.3
  34 http fetch GET 200 https://registry.npmjs.org/@angular%2fcore 161ms (cache revalidated)
  35 silly fetch manifest rxjs@~7.3.0
  36 http fetch GET 200 https://registry.npmjs.org/rxjs 161ms (cache revalidated)
  37 silly fetch manifest zone.js@~0.11.4
  38 http fetch GET 200 https://registry.npmjs.org/zone.js 164ms (cache revalidated)
  39 silly fetch manifest @angular/common@~12.2.3
  40 http fetch GET 200 https://registry.npmjs.org/@angular%2fcommon 202ms (cache revalidated)
  41 silly fetch manifest @angular/compiler@~12.2.3
  42 http fetch GET 200 https://registry.npmjs.org/@angular%2fcompiler 474ms (cache revalidated)
  43 silly fetch manifest @angular/forms@~12.2.3
  44 http fetch GET 200 https://registry.npmjs.org/@angular%2fforms 306ms (cache revalidated)
  45 silly fetch manifest @angular/platform-browser@~12.2.3
  46 http fetch GET 200 https://registry.npmjs.org/@angular%2fplatform-browser 175ms (cache revalidated)
  47 silly fetch manifest @angular/platform-browser-dynamic@~12.2.3
  48 http fetch GET 200 https://registry.npmjs.org/@angular%2fplatform-browser-dynamic 176ms (cache revalidated)
  49 silly fetch manifest @angular/router@~12.2.3
  50 http fetch GET 200 https://registry.npmjs.org/@angular%2frouter 165ms (cache revalidated)
  51 silly fetch manifest @angular-devkit/build-angular@~12.2.3
  52 http fetch GET 200 https://registry.npmjs.org/@angular-devkit%2fbuild-angular 165ms (cache revalidated)
  53 silly fetch manifest @angular/compiler-cli@~12.2.3
  54 http fetch GET 200 https://registry.npmjs.org/@angular%2fcompiler-cli 182ms (cache revalidated)
  55 silly fetch manifest typescript@~4.4.2
  56 http fetch GET 200 https://registry.npmjs.org/typescript 6818ms (cache updated)
  57 silly fetch manifest typescript@&gt;=4.2.3 &lt;4.4
  58 timing idealTree Completed in 11485ms
  59 timing command:install Completed in 11507ms
  60 verbose stack Error: unable to resolve dependency tree
  60 verbose stack     at Arborist.[failPeerConflict] (C:\Users\Salar\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:1274:25)
  60 verbose stack     at Arborist.[loadPeerSet] (C:\Users\Salar\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:1241:34)
  60 verbose stack     at async Arborist.[loadPeerSet] (C:\Users\Salar\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:1226:23)
  60 verbose stack     at async Arborist.[buildDepStep] (C:\Users\Salar\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:877:11)
  60 verbose stack     at async Arborist.buildIdealTree (C:\Users\Salar\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:206:7)
  60 verbose stack     at async Promise.all (index 1)
  60 verbose stack     at async Arborist.reify (C:\Users\Salar\AppData\Roaming\npm\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\reify.js:147:5)
  60 verbose stack     at async Install.install (C:\Users\Salar\AppData\Roaming\npm\node_modules\npm\lib\install.js:150:5)
  61 verbose cwd G:\Projects\salarkazazi
  62 verbose Windows_NT 10.0.19042
  63 verbose argv &quot;G:\\Program Files\\nodejs\\node.exe&quot; &quot;C:\\Users\\Salar\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js&quot; &quot;install&quot;
  64 verbose node v14.17.5
  65 verbose npm  v7.21.0
  66 error code ERESOLVE
  67 error ERESOLVE unable to resolve dependency tree
  68 error
  69 error While resolving: [1msalarkazazi[22m@[1m0.0.0[22m
  69 error Found: [1mtypescript[22m@[1m4.4.2[22m[2m[22m
  69 error [2mnode_modules/typescript[22m
  69 error   [33mdev[39m [1mtypescript[22m@&quot;[1m~4.4.2[22m&quot; from the root project
  69 error
  69 error Could not resolve dependency:
  69 error [35mpeer[39m [1mtypescript[22m@&quot;[1m&gt;=4.2.3 &lt;4.4[22m&quot; from [1m@angular/compiler-cli[22m@[1m12.2.3[22m[2m[22m
  69 error [2mnode_modules/@angular/compiler-cli[22m
  69 error   [33mdev[39m [1m@angular/compiler-cli[22m@&quot;[1m~12.2.3[22m&quot; from the root project
  69 error   [35mpeer[39m [1m@angular/compiler-cli[22m@&quot;[1m^12.0.0[22m&quot; from [1m@angular-devkit/build-angular[22m@[1m12.2.3[22m[2m[22m
  69 error   [2mnode_modules/@angular-devkit/build-angular[22m
  69 error     [33mdev[39m [1m@angular-devkit/build-angular[22m@&quot;[1m~12.2.3[22m&quot; from the root project
  69 error
  69 error Fix the upstream dependency conflict, or retry
  69 error this command with --force, or --legacy-peer-deps
  69 error to accept an incorrect (and potentially broken) dependency resolution.
  69 error
  69 error See C:\Users\Salar\AppData\Local\npm-cache\eresolve-report.txt for a full report.
  70 verbose exit 1
  </code></pre>
  <p>Am i right to guess there is some sort of a problem with dependency tree mostly related to Typescript?</p>
  <p>in my package-lock.json i have this where typescript is inside peer dependency with the version it yelled at me as an error :</p>
  <pre><code>&quot;node_modules/@angular/compiler-cli&quot;: {
        &quot;version&quot;: &quot;12.2.2&quot;,
        &quot;resolved&quot;: &quot;https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-12.2.2.tgz&quot;,
        &quot;integrity&quot;: &quot;sha512-n4X7nE7NEJm8QfKUkPgTXBqyF66FnLtFhjsTnqqSi9u1CdqpBLY7mJkWvQuYob4QfRoKoi2+UxNhoi26fvngCw==&quot;,
        &quot;dev&quot;: true,
        &quot;dependencies&quot;: {
          &quot;@babel/core&quot;: &quot;^7.8.6&quot;,
          &quot;@babel/types&quot;: &quot;^7.8.6&quot;,
          &quot;canonical-path&quot;: &quot;1.0.0&quot;,
          &quot;chokidar&quot;: &quot;^3.0.0&quot;,
          &quot;convert-source-map&quot;: &quot;^1.5.1&quot;,
          &quot;dependency-graph&quot;: &quot;^0.11.0&quot;,
          &quot;magic-string&quot;: &quot;^0.25.0&quot;,
          &quot;minimist&quot;: &quot;^1.2.0&quot;,
          &quot;reflect-metadata&quot;: &quot;^0.1.2&quot;,
          &quot;semver&quot;: &quot;^7.0.0&quot;,
          &quot;source-map&quot;: &quot;^0.6.1&quot;,
          &quot;sourcemap-codec&quot;: &quot;^1.4.8&quot;,
          &quot;tslib&quot;: &quot;^2.2.0&quot;,
          &quot;yargs&quot;: &quot;^17.0.0&quot;
        },
        &quot;bin&quot;: {
          &quot;ivy-ngcc&quot;: &quot;ngcc/main-ivy-ngcc.js&quot;,
          &quot;ng-xi18n&quot;: &quot;src/extract_i18n.js&quot;,
          &quot;ngc&quot;: &quot;src/main.js&quot;,
          &quot;ngcc&quot;: &quot;ngcc/main-ngcc.js&quot;
        },
        &quot;engines&quot;: {
          &quot;node&quot;: &quot;^12.14.1 || &gt;=14.0.0&quot;
        },
        &quot;peerDependencies&quot;: {
          &quot;@angular/compiler&quot;: &quot;12.2.2&quot;,
          &quot;typescript&quot;: &quot;&gt;=4.2.3 &lt;4.4&quot;
        }
      },
  &quot;node_modules/@angular-devkit/build-angular&quot;: {
        &quot;version&quot;: &quot;12.2.2&quot;,
        &quot;resolved&quot;: &quot;https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-12.2.2.tgz&quot;,
        &quot;integrity&quot;: &quot;sha512-/KBz8YlujmRZwWqk3fjV5S4IWKEfDE6Vhpr2uo1GC6KtdK7/tA9usvm3ZGAFMu3DXn3eJwe2StgUnegPg3gqxA==&quot;,
        &quot;dev&quot;: true,
        &quot;dependencies&quot;: {
          &quot;@ampproject/remapping&quot;: &quot;1.0.1&quot;,
          &quot;@angular-devkit/architect&quot;: &quot;0.1202.2&quot;,
          &quot;@angular-devkit/build-optimizer&quot;: &quot;0.1202.2&quot;,
          &quot;@angular-devkit/build-webpack&quot;: &quot;0.1202.2&quot;,
          &quot;@angular-devkit/core&quot;: &quot;12.2.2&quot;,
          &quot;@babel/core&quot;: &quot;7.14.8&quot;,
          &quot;@babel/generator&quot;: &quot;7.14.8&quot;,
          &quot;@babel/helper-annotate-as-pure&quot;: &quot;7.14.5&quot;,
          &quot;@babel/plugin-proposal-async-generator-functions&quot;: &quot;7.14.7&quot;,
          &quot;@babel/plugin-transform-async-to-generator&quot;: &quot;7.14.5&quot;,
          &quot;@babel/plugin-transform-runtime&quot;: &quot;7.14.5&quot;,
          &quot;@babel/preset-env&quot;: &quot;7.14.8&quot;,
          &quot;@babel/runtime&quot;: &quot;7.14.8&quot;,
          &quot;@babel/template&quot;: &quot;7.14.5&quot;,
          &quot;@discoveryjs/json-ext&quot;: &quot;0.5.3&quot;,
          &quot;@jsdevtools/coverage-istanbul-loader&quot;: &quot;3.0.5&quot;,
          &quot;@ngtools/webpack&quot;: &quot;12.2.2&quot;,
          &quot;ansi-colors&quot;: &quot;4.1.1&quot;,
          &quot;babel-loader&quot;: &quot;8.2.2&quot;,
          &quot;browserslist&quot;: &quot;^4.9.1&quot;,
          &quot;cacache&quot;: &quot;15.2.0&quot;,
          &quot;caniuse-lite&quot;: &quot;^1.0.30001032&quot;,
          &quot;circular-dependency-plugin&quot;: &quot;5.2.2&quot;,
          &quot;copy-webpack-plugin&quot;: &quot;9.0.1&quot;,
          &quot;core-js&quot;: &quot;3.16.0&quot;,
          &quot;critters&quot;: &quot;0.0.10&quot;,
          &quot;css-loader&quot;: &quot;6.2.0&quot;,
          &quot;css-minimizer-webpack-plugin&quot;: &quot;3.0.2&quot;,
          &quot;esbuild&quot;: &quot;0.12.17&quot;,
          &quot;find-cache-dir&quot;: &quot;3.3.1&quot;,
          &quot;glob&quot;: &quot;7.1.7&quot;,
          &quot;https-proxy-agent&quot;: &quot;5.0.0&quot;,
          &quot;inquirer&quot;: &quot;8.1.2&quot;,
          &quot;karma-source-map-support&quot;: &quot;1.4.0&quot;,
          &quot;less&quot;: &quot;4.1.1&quot;,
          &quot;less-loader&quot;: &quot;10.0.1&quot;,
          &quot;license-webpack-plugin&quot;: &quot;2.3.20&quot;,
          &quot;loader-utils&quot;: &quot;2.0.0&quot;,
          &quot;mini-css-extract-plugin&quot;: &quot;2.1.0&quot;,
          &quot;minimatch&quot;: &quot;3.0.4&quot;,
          &quot;open&quot;: &quot;8.2.1&quot;,
          &quot;ora&quot;: &quot;5.4.1&quot;,
          &quot;parse5-html-rewriting-stream&quot;: &quot;6.0.1&quot;,
          &quot;piscina&quot;: &quot;3.1.0&quot;,
          &quot;postcss&quot;: &quot;8.3.6&quot;,
          &quot;postcss-import&quot;: &quot;14.0.2&quot;,
          &quot;postcss-loader&quot;: &quot;6.1.1&quot;,
          &quot;postcss-preset-env&quot;: &quot;6.7.0&quot;,
          &quot;regenerator-runtime&quot;: &quot;0.13.9&quot;,
          &quot;resolve-url-loader&quot;: &quot;4.0.0&quot;,
          &quot;rxjs&quot;: &quot;6.6.7&quot;,
          &quot;sass&quot;: &quot;1.36.0&quot;,
          &quot;sass-loader&quot;: &quot;12.1.0&quot;,
          &quot;semver&quot;: &quot;7.3.5&quot;,
          &quot;source-map-loader&quot;: &quot;3.0.0&quot;,
          &quot;source-map-support&quot;: &quot;0.5.19&quot;,
          &quot;style-loader&quot;: &quot;3.2.1&quot;,
          &quot;stylus&quot;: &quot;0.54.8&quot;,
          &quot;stylus-loader&quot;: &quot;6.1.0&quot;,
          &quot;terser&quot;: &quot;5.7.1&quot;,
          &quot;terser-webpack-plugin&quot;: &quot;5.1.4&quot;,
          &quot;text-table&quot;: &quot;0.2.0&quot;,
          &quot;tree-kill&quot;: &quot;1.2.2&quot;,
          &quot;tslib&quot;: &quot;2.3.0&quot;,
          &quot;webpack&quot;: &quot;5.50.0&quot;,
          &quot;webpack-dev-middleware&quot;: &quot;5.0.0&quot;,
          &quot;webpack-dev-server&quot;: &quot;3.11.2&quot;,
          &quot;webpack-merge&quot;: &quot;5.8.0&quot;,
          &quot;webpack-subresource-integrity&quot;: &quot;1.5.2&quot;
        },
        &quot;engines&quot;: {
          &quot;node&quot;: &quot;^12.14.1 || &gt;=14.0.0&quot;,
          &quot;npm&quot;: &quot;^6.11.0 || ^7.5.6&quot;,
          &quot;yarn&quot;: &quot;&gt;= 1.13.0&quot;
        },
        &quot;peerDependencies&quot;: {
          &quot;@angular/compiler-cli&quot;: &quot;^12.0.0&quot;,
          &quot;@angular/localize&quot;: &quot;^12.0.0&quot;,
          &quot;@angular/service-worker&quot;: &quot;^12.0.0&quot;,
          &quot;karma&quot;: &quot;^6.3.0&quot;,
          &quot;ng-packagr&quot;: &quot;^12.0.0&quot;,
          &quot;protractor&quot;: &quot;^7.0.0&quot;,
          &quot;tailwindcss&quot;: &quot;^2.0.0&quot;,
          &quot;tslint&quot;: &quot;^6.1.0&quot;,
          &quot;typescript&quot;: &quot;~4.2.3 || ~4.3.2&quot;
        },
        &quot;peerDependenciesMeta&quot;: {
          &quot;@angular/localize&quot;: {
            &quot;optional&quot;: true
          },
          &quot;@angular/service-worker&quot;: {
            &quot;optional&quot;: true
          },
          &quot;karma&quot;: {
            &quot;optional&quot;: true
          },
          &quot;ng-packagr&quot;: {
            &quot;optional&quot;: true
          },
          &quot;protractor&quot;: {
            &quot;optional&quot;: true
          },
          &quot;tailwindcss&quot;: {
            &quot;optional&quot;: true
          },
          &quot;tslint&quot;: {
            &quot;optional&quot;: true
          }
        }
      },
  </code></pre>
  <p>how could i solve the issue?</p>