Open avaly opened 2 years ago
Additional information. This happens, because there is also a package named typescript-3.9
which get hoisted to the top-level and which exports tsc
bin entry, it is an aliased package. So typescript
and typescript-3.9
race for the .bin
entry.
Self-service
Describe the bug
The wrong version of a dependency
X
is linked innode_modules/.bin/
, but only when in combination with another package, which has a different version of the dependencyX
in its transitive dependency tree.To reproduce
Reproduction repository: https://github.com/avaly/yarn-v3-bin-link-bug
The expected version of
node_modules/.bin/tsc
is4.7.4
.However when also installing the
cdk8s-cli
package,yarn
linkstsc
to version3.9.10
.If you remove the
cdk8s-cli
dependency inpackage.json
, thentsc
is linked correctly to4.7.4
.Environment
Additional context
No response