berry icon indicating copy to clipboard operation
berry copied to clipboard

[Feature] Unable to reuse deps installed indirect bins

Open JounQin opened this issue 1 year ago • 1 comments

  • [x] I'd be willing to implement this feature (contributing guide)
  • [x] This feature is important to have in this repository; a contrib plugin wouldn't do

Describe the user story

When I install package A which depends on a bin B, I'd like to use bin B directly without install B specifically, and actually it is in node_modules/.bin folder already.

Now, yarn berry enforces me to install bin B again which could be conflict with the original one or just a duplicate, I don't want to maintain bin B two places.

Describe the solution you'd like

A new setting like implicitBin: true config in .yarnrc.yml

Describe the drawbacks of your solution

N/A

Describe alternatives you've considered

Keep it as is and let the user to install bin B manually

JounQin avatar Nov 03 '23 16:11 JounQin

I think this might just be a bug? I don't know why this functionality got lost between v1 and v4, but I've been experiencing issues using dependencies listed in my monorepo root when I'm in subdirectories. Yarn is also forcing me to use the full name of a package, in this case yarn just-scripts ... instead of yarn just, even though node_modules/.bin/just works fine

#6045

zachbryant avatar Dec 28 '23 10:12 zachbryant