Skip to content

fix(cli.js): Fix package installation on yarn 2+#3012

Merged
lucasfernog merged 2 commits intonextfrom
fix/yarn-pnp
Dec 9, 2021
Merged

fix(cli.js): Fix package installation on yarn 2+#3012
lucasfernog merged 2 commits intonextfrom
fix/yarn-pnp

Conversation

@FabianLars
Copy link
Member

Yarn 2+ uses pnp by default. This makes installed npm packages read-only by default. This will obviously break the rust-cli download. To fix this we need yarn to unplug our cli. We can either tell the user to do that after each installation (lol no) or tell yarn to do it automatically by specifying a "postinstall" script. This script can be empty too so we don't have to go through the hassle of rewriting our download script to actually happen at postinstall time. Who knows what new issues this will create 😅

In theory this would close some gh issues, but they are already closed lol.

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Docs
  • New Binding Issue #___
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change? (check one)

  • Yes. Issue #___
  • No

The PR fulfills these requirements:

  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix: #xxx[,#xxx], where "xxx" is the issue number)
  • A change file is added if any packages will require a version bump due to this PR per the instructions in the readme.

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

@FabianLars FabianLars requested a review from a team as a code owner December 2, 2021 11:14
@FabianLars FabianLars requested a review from a team December 2, 2021 11:14
@lucasfernog lucasfernog merged commit 1e336b6 into next Dec 9, 2021
@lucasfernog lucasfernog deleted the fix/yarn-pnp branch December 9, 2021 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants