Multiple versions of the same package in the yarn.lock file

To investigate how many times a depenedency is installed and what packages dependens on it (recursivly), run: yarn why <package-name>.

See if you can upgrade (or downgrade) some packages to ensure that all of the dependencies in your package are using the same version of angular.

For example: yarn why execa:

yarn why v1.22.5
[1/4] 🤔  Why do we have the module "execa"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
=> Found "[email protected]"
info Has been hoisted to "execa"
info Reasons this module exists
   - "workspace-aggregator-c3b3be41-6d00-4635-98a6-d5373b215152" depends on it
   - Specified in "devDependencies"
   - Hoisted from "_project_#pretty-quick#execa"
   - Hoisted from "_project_#@tahini#nc#execa"
   - Hoisted from "_project_#execa"
   - Hoisted from "_project_#jest#@jest#core#jest-changed-files#execa"
info Disk size without dependencies: "136KB"
info Disk size with unique dependencies: "520KB"
info Disk size with transitive dependencies: "736KB"
info Number of shared dependencies: 19
=> Found "lint-staged#[email protected]"
info This module exists because "_project_#lint-staged" depends on it.
info Disk size without dependencies: "76KB"
info Disk size with unique dependencies: "400KB"
info Disk size with transitive dependencies: "616KB"
info Number of shared dependencies: 19
=> Found "sane#[email protected]"
info This module exists because "_project_#jest-haste-map#sane" depends on it.
info Disk size without dependencies: "40KB"
info Disk size with unique dependencies: "328KB"
info Disk size with transitive dependencies: "524KB"
info Number of shared dependencies: 16
=> Found "create-folder-structure#[email protected]"
info Reasons this module exists
   - "_project_#create-folder-structure#pretty-quick" depends on it
   - Hoisted from "_project_#create-folder-structure#pretty-quick#execa"
info Disk size without dependencies: "76KB"
info Disk size with unique dependencies: "400KB"
info Disk size with transitive dependencies: "616KB"
info Number of shared dependencies: 19
=> Found "term-size#[email protected]"
info This module exists because "_project_#nodemon#update-notifier#boxen#term-size" depends on it.
info Disk size without dependencies: "36KB"
info Disk size with unique dependencies: "324KB"
info Disk size with transitive dependencies: "520KB"
info Number of shared dependencies: 16

Note:

  • Sometimes a dev-dependency is causing that.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)