Skip to main content

This article works through the steps to update dependencies in package.json file to the latest version.

Use npm-check-updates or npm outdated to suggest the latest versions.

npm-check-updates is a utility that automatically adjusts a package.json with the latest version of all dependencies

npm install -g npm-check-updates
ncu -u
npm install

However, a less intrusive (avoids a global install) way of doing this if you have a modern version of npm is:

npx npm-check-updates -u
npm install

 

Steps from above with responses

Running the check updates command:

npm install -g npm-check-updates

Response:

added 280 packages, and audited 281 packages in 13s

55 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Run the command update check

ncu -u

Response:

[====================] 69/69 100%

 @angular/cli                         ^14.1.0  →    ^14.1.1
 @angular/common                      ^14.1.0  →    ^14.1.1
 @angular/core                        ^14.1.0  →    ^14.1.1
 @angular/forms                       ^14.1.0  →    ^14.1.1
 @angular/platform-browser            ^14.1.0  →    ^14.1.1
 @angular/platform-browser-dynamic    ^14.1.0  →    ^14.1.1
 @angular/pwa                         ^14.1.0  →    ^14.1.1
 @angular/router                      ^14.1.0  →    ^14.1.1
 @angular/service-worker              ^14.1.0  →    ^14.1.1
 @ionic/angular                        ^6.2.0  →     ^6.2.1
 @angular-devkit/architect          ^0.1401.0  →  ^0.1401.1
 @angular-devkit/build-angular        ^14.1.0  →    ^14.1.1
 @angular-devkit/core                 ^14.1.0  →    ^14.1.1
 @angular-devkit/schematics           ^14.1.0  →    ^14.1.1
 @angular/compiler                    ^14.1.0  →    ^14.1.1
 @angular/compiler-cli                ^14.1.0  →    ^14.1.1
 @angular/language-service            ^14.1.0  →    ^14.1.1
 @types/node                          ^18.6.3  →    ^18.6.4
 eslint                               ^8.20.0  →    ^8.21.0

npm install command 

npm install

Response:

removed 1 package, and audited 1307 packages in 3s

137 packages are looking for funding
  run `npm fund` for details

2 moderate severity vulnerabilities

To address all issues (including breaking changes), run:
  npm audit fix --force

 

To see which packages have newer versions available, you can also use the following command:

npm outdated

If you want to update just one dependency just use the following command:

npm install yourPackage@latest

 

Clean install

However, you have reached this point, highly recommended to do a clean install (w/o the rm I got some dependency warnings)

rm -rf node_modules
npm install 

 

Dependency list

Also, you can check the current top-level installed library versions with

npm list --depth=0

Response:

├── @angular-devkit/architect@0.1401.1
├── @angular-devkit/build-angular@14.1.1
├── @angular-devkit/core@14.1.1
├── @angular-devkit/schematics@14.1.1
├── @angular/cli@14.1.1
├── @angular/common@14.1.1
├── @angular/compiler-cli@14.1.1
├── @angular/compiler@14.1.1
├── @angular/core@14.1.1
├── @angular/forms@14.1.1
├── @angular/language-service@14.1.1
├── @angular/platform-browser-dynamic@14.1.1
├── @angular/platform-browser@14.1.1
├── @angular/pwa@14.1.1
├── @angular/router@14.1.1
├── @angular/service-worker@14.1.1
├── @asymmetrik/ngx-leaflet@14.0.1
├── @capacitor/android@4.0.1
├── @capacitor/app@4.0.1
├── @capacitor/camera@4.0.1
├── @capacitor/cli@4.0.1
├── @capacitor/core@4.0.1
├── @capacitor/filesystem@4.0.1
├── @capacitor/haptics@4.0.1
├── @capacitor/ios@4.0.1
├── @capacitor/keyboard@4.0.1
├── @capacitor/splash-screen@4.0.1
├── @capacitor/status-bar@4.0.1
├── @ionic-native/android-permissions@5.36.0
├── @ionic-native/core@5.36.0
├── @ionic-native/http@5.36.0
├── @ionic/angular-toolkit@7.0.0
├── @ionic/angular@6.2.1
├── @ionic/lab@3.2.13
├── @ionic/pwa-elements@3.1.1
├── @ionic/storage-angular@3.0.6
├── @types/jasmine@4.0.3
├── @types/jasminewd2@2.0.10
├── @types/leaflet@1.7.11
├── @types/node@18.6.4
├── codelyzer@6.0.2
├── cordova-android@11.0.0
├── cordova-ios@6.2.0
├── cordova-plugin-advanced-http@3.3.1
├── cordova-plugin-android-permissions@1.1.3
├── cordova-plugin-device@2.1.0
├── cordova-plugin-file-opener2@3.0.5
├── cordova-plugin-file@7.0.0
├── cordova-plugin-ionic-keyboard@2.2.0
├── cordova-plugin-ionic-webview@5.0.0
├── cordova-plugin-splashscreen@6.0.2
├── cordova-plugin-statusbar@3.0.0
├── cordova-sqlite-storage@6.0.0
├── core-js@3.24.1
├── eslib@0.2.2
├── eslint@8.21.0
├── jasmine-core@4.3.0
├── jasmine-spec-reporter@7.0.0
├── jetifier@2.0.0
├── karma-coverage-istanbul-reporter@3.0.3
├── karma-jasmine-html-reporter@2.0.0
├── karma-jasmine@5.1.0
├── karma@6.4.0
├── leaflet@1.8.0
├── localforage@1.10.0
├── protractor@7.0.0
├── ts-node@10.9.1
├── typescript@4.7.4
└── zone.js@0.11.7

 

Whereas, if you want to see the dependencies for each of these then alter the depth.  In this example I'll use 1, but review 5 to review the packages and potential issues:

npm list --depth=1

Response:

├─┬ @angular-devkit/architect@0.1401.1
│ ├── @angular-devkit/core@14.1.1 deduped
│ └── rxjs@6.6.7
├─┬ @angular-devkit/build-angular@14.1.1
│ ├── @ampproject/remapping@2.2.0
│ ├── @angular-devkit/architect@0.1401.1 deduped
│ ├── @angular-devkit/build-webpack@0.1401.1
│ ├── @angular-devkit/core@14.1.1 deduped
│ ├── @angular/compiler-cli@14.1.1 deduped
│ ├── UNMET OPTIONAL DEPENDENCY @angular/localize@^14.0.0
│ ├── @angular/service-worker@14.1.1 deduped
│ ├── @babel/core@7.18.6
│ ├── @babel/generator@7.18.7
│ ├── @babel/helper-annotate-as-pure@7.18.6
│ ├── @babel/plugin-proposal-async-generator-functions@7.18.6
│ ├── @babel/plugin-transform-async-to-generator@7.18.6
│ ├── @babel/plugin-transform-runtime@7.18.6
│ ├── @babel/preset-env@7.18.6
│ ├── @babel/runtime@7.18.6
│ ├── @babel/template@7.18.6
│ ├── @discoveryjs/json-ext@0.5.7
│ ├── @ngtools/webpack@14.1.1
│ ├── ansi-colors@4.1.3
│ ├── babel-loader@8.2.5
│ ├── babel-plugin-istanbul@6.1.1
│ ├── browserslist@4.21.3
│ ├── cacache@16.1.1
│ ├── copy-webpack-plugin@11.0.0
│ ├── critters@0.0.16
│ ├── css-loader@6.7.1
│ ├── esbuild-wasm@0.14.49
│ ├── esbuild@0.14.49
│ ├── glob@8.0.3
│ ├── https-proxy-agent@5.0.1
│ ├── inquirer@8.2.4
│ ├── jsonc-parser@3.1.0
│ ├── karma-source-map-support@1.4.0
│ ├── karma@6.4.0 deduped
│ ├── less-loader@11.0.0
│ ├── less@4.1.3
│ ├── license-webpack-plugin@4.0.2
│ ├── loader-utils@3.2.0
│ ├── mini-css-extract-plugin@2.6.1
│ ├── minimatch@5.1.0
│ ├── UNMET OPTIONAL DEPENDENCY ng-packagr@^14.0.0
│ ├── open@8.4.0
│ ├── ora@5.4.1
│ ├── parse5-html-rewriting-stream@6.0.1
│ ├── piscina@3.2.0
│ ├── postcss-import@14.1.0
│ ├── postcss-loader@7.0.1
│ ├── postcss-preset-env@7.7.2
│ ├── postcss@8.4.14
│ ├── protractor@7.0.0 deduped
│ ├── regenerator-runtime@0.13.9
│ ├── resolve-url-loader@5.0.0
│ ├── rxjs@6.6.7 deduped
│ ├── sass-loader@13.0.2
│ ├── sass@1.53.0
│ ├── semver@7.3.7
│ ├── source-map-loader@4.0.0
│ ├── source-map-support@0.5.21
│ ├── stylus-loader@7.0.0
│ ├── stylus@0.58.1
│ ├── UNMET OPTIONAL DEPENDENCY tailwindcss@^2.0.0 || ^3.0.0
│ ├── terser@5.14.2
│ ├── text-table@0.2.0
│ ├── tree-kill@1.2.2
│ ├── tslib@2.4.0
│ ├── typescript@4.7.4 deduped
│ ├── webpack-dev-middleware@5.3.3
│ ├── webpack-dev-server@4.9.3
│ ├── webpack-merge@5.8.0
│ ├── webpack-subresource-integrity@5.1.0
│ └── webpack@5.73.0
├─┬ @angular-devkit/core@14.1.1
│ ├── ajv-formats@2.1.1
│ ├── ajv@8.11.0
│ ├── chokidar@3.5.3
│ ├── jsonc-parser@3.1.0 deduped
│ ├── rxjs@6.6.7 deduped
│ └── source-map@0.7.4
├─┬ @angular-devkit/schematics@14.1.1
│ ├── @angular-devkit/core@14.1.1 deduped
│ ├── jsonc-parser@3.1.0 deduped
│ ├── magic-string@0.26.2
│ ├── ora@5.4.1 deduped
│ └── rxjs@6.6.7 deduped
├─┬ @angular/cli@14.1.1
│ ├── @angular-devkit/architect@0.1401.1 deduped
│ ├── @angular-devkit/core@14.1.1 deduped
│ ├── @angular-devkit/schematics@14.1.1 deduped
│ ├── @schematics/angular@14.1.1
│ ├── @yarnpkg/lockfile@1.1.0
│ ├── ansi-colors@4.1.3 deduped
│ ├── debug@4.3.4
│ ├── ini@3.0.0
│ ├── inquirer@8.2.4 deduped
│ ├── jsonc-parser@3.1.0 deduped
│ ├── npm-package-arg@9.1.0
│ ├── npm-pick-manifest@7.0.1
│ ├── open@8.4.0 deduped
│ ├── ora@5.4.1 deduped
│ ├── pacote@13.6.1
│ ├── resolve@1.22.1
│ ├── semver@7.3.7 deduped
│ ├── symbol-observable@4.0.0
│ ├── uuid@8.3.2
│ └── yargs@17.5.1
├─┬ @angular/common@14.1.1
│ ├── @angular/core@14.1.1 deduped
│ ├── rxjs@6.6.7 deduped
│ └── tslib@2.4.0 deduped
├─┬ @angular/compiler-cli@14.1.1
│ ├── @angular/compiler@14.1.1 deduped
│ ├── @babel/core@7.18.6 deduped
│ ├── chokidar@3.5.3 deduped
│ ├── convert-source-map@1.8.0
│ ├── dependency-graph@0.11.0
│ ├── magic-string@0.26.2 deduped
│ ├── reflect-metadata@0.1.13
│ ├── semver@7.3.7 deduped
│ ├── sourcemap-codec@1.4.8
│ ├── tslib@2.4.0 deduped
│ ├── typescript@4.7.4 deduped
│ └── yargs@17.5.1 deduped
├─┬ @angular/compiler@14.1.1
│ ├── @angular/core@14.1.1 deduped
│ └── tslib@2.4.0 deduped
├─┬ @angular/core@14.1.1
│ ├── rxjs@6.6.7 deduped
│ ├── tslib@2.4.0 deduped
│ └── zone.js@0.11.7 deduped
├─┬ @angular/forms@14.1.1
│ ├── @angular/common@14.1.1 deduped
│ ├── @angular/core@14.1.1 deduped
│ ├── @angular/platform-browser@14.1.1 deduped
│ ├── rxjs@6.6.7 deduped
│ └── tslib@2.4.0 deduped
├── @angular/language-service@14.1.1
├─┬ @angular/platform-browser-dynamic@14.1.1
│ ├── @angular/common@14.1.1 deduped
│ ├── @angular/compiler@14.1.1 deduped
│ ├── @angular/core@14.1.1 deduped
│ ├── @angular/platform-browser@14.1.1 deduped
│ └── tslib@2.4.0 deduped
├─┬ @angular/platform-browser@14.1.1
│ ├── UNMET OPTIONAL DEPENDENCY @angular/animations@14.1.1
│ ├── @angular/common@14.1.1 deduped
│ ├── @angular/core@14.1.1 deduped
│ └── tslib@2.4.0 deduped
├─┬ @angular/pwa@14.1.1
│ ├── @angular-devkit/schematics@14.1.1 deduped
│ ├── @angular/cli@14.1.1 deduped
│ ├── @schematics/angular@14.1.1 deduped
│ └── parse5-html-rewriting-stream@6.0.1 deduped
├─┬ @angular/router@14.1.1
│ ├── @angular/common@14.1.1 deduped
│ ├── @angular/core@14.1.1 deduped
│ ├── @angular/platform-browser@14.1.1 deduped
│ ├── rxjs@6.6.7 deduped
│ └── tslib@2.4.0 deduped
├─┬ @angular/service-worker@14.1.1
│ ├── @angular/common@14.1.1 deduped
│ ├── @angular/core@14.1.1 deduped
│ └── tslib@2.4.0 deduped
├─┬ @asymmetrik/ngx-leaflet@14.0.1
│ ├── @angular/common@14.1.1 deduped
│ ├── @angular/core@14.1.1 deduped
│ ├── leaflet@1.8.0 deduped
│ └── tslib@2.4.0 deduped
├─┬ @capacitor/android@4.0.1
│ └── @capacitor/core@4.0.1 deduped
├─┬ @capacitor/app@4.0.1
│ └── @capacitor/core@4.0.1 deduped
├─┬ @capacitor/camera@4.0.1
│ └── @capacitor/core@4.0.1 deduped
├─┬ @capacitor/cli@4.0.1
│ ├── @ionic/cli-framework-output@2.2.5
│ ├── @ionic/utils-fs@3.1.6
│ ├── @ionic/utils-subprocess@2.1.11
│ ├── @ionic/utils-terminal@2.3.3
│ ├── commander@9.4.0
│ ├── debug@4.3.4 deduped
│ ├── env-paths@2.2.1
│ ├── kleur@4.1.5
│ ├── native-run@1.6.0
│ ├── open@8.4.0 deduped
│ ├── plist@3.0.6
│ ├── prompts@2.4.2
│ ├── rimraf@3.0.2
│ ├── semver@7.3.7 deduped
│ ├── tar@6.1.11
│ ├── tslib@2.4.0 deduped
│ └── xml2js@0.4.23
├─┬ @capacitor/core@4.0.1
│ └── tslib@2.4.0 deduped
├─┬ @capacitor/filesystem@4.0.1
│ └── @capacitor/core@4.0.1 deduped
├─┬ @capacitor/haptics@4.0.1
│ └── @capacitor/core@4.0.1 deduped
├─┬ @capacitor/ios@4.0.1
│ └── @capacitor/core@4.0.1 deduped
├─┬ @capacitor/keyboard@4.0.1
│ └── @capacitor/core@4.0.1 deduped
├─┬ @capacitor/splash-screen@4.0.1
│ └── @capacitor/core@4.0.1 deduped
├─┬ @capacitor/status-bar@4.0.1
│ └── @capacitor/core@4.0.1 deduped
├─┬ @ionic-native/android-permissions@5.36.0
│ ├── @ionic-native/core@5.36.0 deduped
│ ├── @types/cordova@0.0.34
│ └── rxjs@6.6.7 deduped
├─┬ @ionic-native/core@5.36.0
│ ├── @types/cordova@0.0.34 deduped
│ └── rxjs@6.6.7 deduped
├─┬ @ionic-native/http@5.36.0
│ ├── @ionic-native/core@5.36.0 deduped
│ ├── @types/cordova@0.0.34 deduped
│ └── rxjs@6.6.7 deduped
├─┬ @ionic/angular-toolkit@7.0.0
│ ├── @angular-devkit/core@14.1.1 deduped
│ ├── @angular-devkit/schematics@14.1.1 deduped
│ └── @schematics/angular@14.1.1 deduped
├─┬ @ionic/angular@6.2.1
│ ├── @angular/core@14.1.1 deduped
│ ├── @angular/forms@14.1.1 deduped
│ ├── @angular/router@14.1.1 deduped
│ ├── @ionic/core@6.2.1
│ ├── jsonc-parser@3.1.0 deduped
│ ├── rxjs@6.6.7 deduped
│ ├── tslib@2.4.0 deduped
│ └── zone.js@0.11.7 deduped
├─┬ @ionic/lab@3.2.13
│ ├── @ionic/cli-framework@5.1.3
│ ├── @ionic/utils-fs@3.1.6 deduped
│ ├── chalk@4.1.2
│ ├── express@4.18.1
│ └── tslib@2.4.0 deduped
├── @ionic/pwa-elements@3.1.1
├─┬ @ionic/storage-angular@3.0.6
│ ├── @angular/core@14.1.1 deduped
│ ├── @ionic/storage@3.0.6
│ ├── rxjs@6.6.7 deduped
│ └── tslib@1.14.1
├── @types/jasmine@4.0.3
├─┬ @types/jasminewd2@2.0.10
│ └── @types/jasmine@4.0.3 deduped
├─┬ @types/leaflet@1.7.11
│ └── @types/geojson@7946.0.10
├── @types/node@18.6.4
├─┬ codelyzer@6.0.2
│ ├── @angular/compiler@9.0.0
│ ├── @angular/core@9.0.0
│ ├── app-root-path@3.0.0
│ ├── aria-query@3.0.0
│ ├── axobject-query@2.0.2
│ ├── css-selector-tokenizer@0.7.3
│ ├── cssauron@1.4.0
│ ├── damerau-levenshtein@1.0.8
│ ├── rxjs@6.6.7 deduped
│ ├── semver-dsl@1.0.1
│ ├── source-map@0.5.7
│ ├── sprintf-js@1.1.2
│ ├── tslib@1.14.1
│ ├── tslint@6.1.3
│ └── zone.js@0.10.3
├─┬ cordova-android@11.0.0
│ ├── android-versions@1.7.0
│ ├── cordova-common@4.0.2
│ ├── execa@5.1.1
│ ├── fast-glob@3.2.11
│ ├── fs-extra@10.1.0
│ ├── is-path-inside@3.0.3
│ ├── nopt@5.0.0
│ ├── properties-parser@0.3.1
│ ├── semver@7.3.7 deduped
│ ├── untildify@4.0.0
│ └── which@2.0.2
├─┬ cordova-ios@6.2.0
│ ├── cordova-common@4.0.2 deduped
│ ├── fs-extra@9.1.0
│ ├── ios-sim@8.0.2
│ ├── nopt@5.0.0 deduped
│ ├── plist@3.0.6 deduped
│ ├── semver@7.3.7 deduped
│ ├── unorm@1.6.0
│ ├── which@2.0.2 deduped
│ ├── xcode@3.0.1
│ └── xml-escape@1.1.0
├── cordova-plugin-advanced-http@3.3.1
├── cordova-plugin-android-permissions@1.1.3
├── cordova-plugin-device@2.1.0
├── cordova-plugin-file-opener2@3.0.5
├── cordova-plugin-file@7.0.0
├── cordova-plugin-ionic-keyboard@2.2.0
├── cordova-plugin-ionic-webview@5.0.0
├── cordova-plugin-splashscreen@6.0.2
├── cordova-plugin-statusbar@3.0.0
├─┬ cordova-sqlite-storage@6.0.0
│ └── cordova-sqlite-storage-dependencies@4.0.0
├── core-js@3.24.1
├─┬ eslib@0.2.2
│ └── semver@5.7.1
├─┬ eslint@8.21.0
│ ├── @eslint/eslintrc@1.3.0
│ ├── @humanwhocodes/config-array@0.10.4
│ ├── @humanwhocodes/gitignore-to-minimatch@1.0.2
│ ├── ajv@6.12.6
│ ├── chalk@4.1.2
│ ├── cross-spawn@7.0.3
│ ├── debug@4.3.4 deduped
│ ├── doctrine@3.0.0
│ ├── escape-string-regexp@4.0.0
│ ├── eslint-scope@7.1.1
│ ├── eslint-utils@3.0.0
│ ├── eslint-visitor-keys@3.3.0
│ ├── espree@9.3.3
│ ├── esquery@1.4.0
│ ├── esutils@2.0.3
│ ├── fast-deep-equal@3.1.3
│ ├── file-entry-cache@6.0.1
│ ├── find-up@5.0.0
│ ├── functional-red-black-tree@1.0.1
│ ├── glob-parent@6.0.2
│ ├── globals@13.17.0
│ ├── globby@11.1.0
│ ├── grapheme-splitter@1.0.4
│ ├── ignore@5.2.0
│ ├── import-fresh@3.3.0
│ ├── imurmurhash@0.1.4
│ ├── is-glob@4.0.3
│ ├── js-yaml@4.1.0
│ ├── json-stable-stringify-without-jsonify@1.0.1
│ ├── levn@0.4.1
│ ├── lodash.merge@4.6.2
│ ├── minimatch@3.1.2
│ ├── natural-compare@1.4.0
│ ├── optionator@0.9.1
│ ├── regexpp@3.2.0
│ ├── strip-ansi@6.0.1
│ ├── strip-json-comments@3.1.1
│ ├── text-table@0.2.0 deduped
│ └── v8-compile-cache@2.3.0
├── jasmine-core@4.3.0
├─┬ jasmine-spec-reporter@7.0.0
│ └── colors@1.4.0
├── jetifier@2.0.0
├─┬ karma-coverage-istanbul-reporter@3.0.3
│ ├── istanbul-lib-coverage@3.2.0
│ ├── istanbul-lib-report@3.0.0
│ ├── istanbul-lib-source-maps@3.0.6
│ ├── istanbul-reports@3.1.5
│ └── minimatch@3.1.2
├─┬ karma-jasmine-html-reporter@2.0.0
│ ├── jasmine-core@4.3.0 deduped
│ ├── karma-jasmine@5.1.0 deduped
│ └── karma@6.4.0 deduped
├─┬ karma-jasmine@5.1.0
│ ├── jasmine-core@4.3.0 deduped
│ └── karma@6.4.0 deduped
├─┬ karma@6.4.0
│ ├── @colors/colors@1.5.0
│ ├── body-parser@1.20.0
│ ├── braces@3.0.2
│ ├── chokidar@3.5.3 deduped
│ ├── connect@3.7.0
│ ├── di@0.0.1
│ ├── dom-serialize@2.2.1
│ ├── glob@7.2.3
│ ├── graceful-fs@4.2.10
│ ├── http-proxy@1.18.1
│ ├── isbinaryfile@4.0.10
│ ├── lodash@4.17.21
│ ├── log4js@6.6.1
│ ├── mime@2.6.0
│ ├── minimatch@3.1.2
│ ├── mkdirp@0.5.6
│ ├── qjobs@1.2.0
│ ├── range-parser@1.2.1
│ ├── rimraf@3.0.2 deduped
│ ├── socket.io@4.5.1
│ ├── source-map@0.6.1
│ ├── tmp@0.2.1
│ ├── ua-parser-js@0.7.31
│ └── yargs@16.2.0
├── leaflet@1.8.0
├─┬ localforage@1.10.0
│ └── lie@3.1.1
├─┬ protractor@7.0.0
│ ├── @types/q@0.0.32
│ ├── @types/selenium-webdriver@3.0.20
│ ├── blocking-proxy@1.0.1
│ ├── browserstack@1.6.1
│ ├── chalk@1.1.3
│ ├── glob@7.2.3
│ ├── jasmine@2.8.0
│ ├── jasminewd2@2.2.0
│ ├── q@1.4.1
│ ├── saucelabs@1.5.0
│ ├── selenium-webdriver@3.6.0
│ ├── source-map-support@0.4.18
│ ├── webdriver-js-extender@2.1.0
│ ├── webdriver-manager@12.1.8
│ └── yargs@15.4.1
├─┬ ts-node@10.9.1
│ ├── @cspotcode/source-map-support@0.8.1
│ ├── UNMET OPTIONAL DEPENDENCY @swc/core@>=1.2.50
│ ├── UNMET OPTIONAL DEPENDENCY @swc/wasm@>=1.2.50
│ ├── @tsconfig/node10@1.0.9
│ ├── @tsconfig/node12@1.0.11
│ ├── @tsconfig/node14@1.0.3
│ ├── @tsconfig/node16@1.0.3
│ ├── @types/node@18.6.4 deduped
│ ├── acorn-walk@8.2.0
│ ├── acorn@8.8.0
│ ├── arg@4.1.3
│ ├── create-require@1.1.1
│ ├── diff@4.0.2
│ ├── make-error@1.3.6
│ ├── typescript@4.7.4 deduped
│ ├── v8-compile-cache-lib@3.0.1
│ └── yn@3.1.1
├── typescript@4.7.4
└─┬ zone.js@0.11.7
  └── tslib@2.4.0 deduped

 

npm terms 

deduped

deduped is short for "deduplicated".  It looks if multiple packages have the same dependencies (meaning the same packages and version range) and "points" them to the same package.  If the same package is referenced, don't have them installed twice.  You can validate this, as every package in your dependency graph that says deduped, can be found at least one more time in the graph, usually at a higher level.

├─┬ @angular-devkit/architect@0.1401.1
│ ├── @angular-devkit/core@14.1.1 deduped
│ └── rxjs@6.6.7

 

UNMET OPTIONAL DEPENDENCY

│ ├── @angular/compiler-cli@14.1.1 deduped
│ ├── UNMET OPTIONAL DEPENDENCY @angular/localize@^14.0.0
│ ├── @angular/service-worker@14.1.1 deduped

It is because the dependency resolution is broken 

A possible solution:

npm cache clean
rm -rf node_modules
npm install

 

npm cache clean

npm ERR! As of npm@5, the npm cache self-heals from corruption issues
npm ERR!   by treating integrity mismatches as cache misses.  As a result,
npm ERR!   data extracted from the cache is guaranteed to be valid.  If you
npm ERR!   want to make sure everything is consistent, use `npm cache verify`
npm ERR!   instead.  Deleting the cache can only make npm go slower, and is
npm ERR!   not likely to correct any problems you may be encountering!
npm ERR!
npm ERR!   On the other hand, if you're debugging an issue with the installer,
npm ERR!   or race conditions that depend on the timing of writing to an empty
npm ERR!   cache, you can use `npm install --cache /tmp/empty-cache` to use a
npm ERR!   temporary cache instead of nuking the actual one.
npm ERR!
npm ERR!   If you're sure you want to delete the entire cache, rerun this command
npm ERR!   with --force.

 

npm cache verify

Cache verified and compressed (~/.npm/_cacache)
Content verified: 7758 (982699010 bytes)
Content garbage-collected: 3300 (1236128784 bytes)
Index entries: 8845
Finished in 26.289s

 

However, post running npm clean verify with a rebuild the node package with unmet optional dependencies.  So try:

npm cache clean --force
rm -rf node_modules
npm install

 

Related articles

Andrew Fletcher04 Apr 2024
404 Not Found - @fortawesome%2fpro-light-svg-icons
When executing the following command, the response I'm getting isnpm ERR! code E404 npm ERR! 404 Not Found - GET https://registry.npmjs.org/@fortawesome%2fpro-light-svg-icons - Not found npm ERR! 404 npm ERR! 404 '@fortawesome/pro-light-svg-icons@^5.11.2' is not in this registry. npm ERR!...
Andrew Fletcher29 Sep 2023
Setting up an ionic app
Recently a client handed me code that runs an app through iOS and Android.  No details about whether native or otherwise.  Once I had the opportunity to crawl through the code, definitely not native.  Typescript, Angular, Cordova... etc.Glancing at the modification dates, the last...