Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yarn why <pkg> should list all instances of a package inside the dependency tree #3228

Closed
SimenB opened this issue Apr 22, 2017 · 1 comment
Labels
cat-feature fixed-in-modern This issue has been fixed / implemented in Yarn 2+. good first issue triaged

Comments

@SimenB
Copy link
Contributor

SimenB commented Apr 22, 2017

Do you want to request a feature or report a bug?

I'd like to call it a bug, might be feature, though 😄

What is the current behavior?

$ rm-rf woo && mkdir woo && cd woo && yarn init -y && yarn add @google-cloud/storage && yarn why retry-request
yarn why v0.23.2
[1/4] 🤔  Why do we have the module "retry-request"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] 🔍  Finding dependency...
[4/4] 🚡  Calculating file sizes...
info This module exists because "@google-cloud/storage#@google-cloud/common" depends on it.
info Disk size without dependencies: "16kB"
info Disk size with unique dependencies: "296kB"
info Disk size with transitive dependencies: "6.49MB"
info Amount of shared dependencies: 25
✨  Done in 0.46s.

But there are two versions of that dep installed:

$ npm ls retry-request
woo@1.0.0 /Users/simen/Development/woo
└─┬ @google-cloud/storage@1.1.0
  └─┬ @google-cloud/common@0.13.2
    ├─┬ google-auto-auth@0.6.0
    │ └─┬ gcp-metadata@0.1.0
    │   └── retry-request@1.3.2
    └── retry-request@2.0.0

(can't really use yarn list here because of #1845)

If the current behavior is a bug, please provide the steps to reproduce.

See above

What is the expected behavior?
That I'd at least be told the version used in the why, but also be told that there are two separate versions installed.

Please mention your node.js, yarn and operating system version.
Node@6.10.2, yarn@0.23.2, macos

yarn.lock file in case deps change so the repro becomes invalid: https://gist.github.com/anonymous/7a66c0436ba52792266374c62f14d983

@arcanis arcanis changed the title yarn why <pkg> only lists single instance of pkg, no mention of version yarn why <pkg> should list every instances of a package inside the dependency tree Jun 6, 2017
@arcanis arcanis changed the title yarn why <pkg> should list every instances of a package inside the dependency tree yarn why <pkg> should list all instances of a package inside the dependency tree Jun 6, 2017
@merceyz
Copy link
Member

merceyz commented Jan 4, 2021

Closing as fixed in v2

https://yarnpkg.com/getting-started/migration

@merceyz merceyz closed this as completed Jan 4, 2021
@merceyz merceyz added the fixed-in-modern This issue has been fixed / implemented in Yarn 2+. label Jan 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat-feature fixed-in-modern This issue has been fixed / implemented in Yarn 2+. good first issue triaged
Projects
None yet
Development

No branches or pull requests

6 participants