Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

yarn-path configuration property forces needless yarn binary installs #594

Open
JGAntunes opened this issue Jul 15, 2021 · 0 comments
Open
Labels
theme/dependencies theme/package-managers type: bug code to address defects in shipped code

Comments

@JGAntunes
Copy link
Contributor

Within our build system we rely on yarn --version to detect a mismatch between the default/configured yarn version and what we currently have installed in our build context. Defining a yarn-path in your .yarnrc sets a local yarn binary to execute within the context of that project. This means that the following scenario is possible:

  • Your site has a default pinned version for yarn (e.g. 1.22.10)
  • Your project has a .yarnrc with a yarn-path config property set to a local binary (e.g. version 1.21.1)

In that case, on every build, you'll always be installing a unused yarn version. Example logs:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
theme/dependencies theme/package-managers type: bug code to address defects in shipped code
Projects
None yet
Development

No branches or pull requests

2 participants