Skip to content

dev: yarn berry from corepack, parked where it cannot clobber pnpm - #81

Merged
landsman merged 1 commit into
mainfrom
yarn
Aug 12, 2026
Merged

dev: yarn berry from corepack, parked where it cannot clobber pnpm#81
landsman merged 1 commit into
mainfrom
yarn

Conversation

@landsman

Copy link
Copy Markdown
Owner

make install in a Berry project failed with yarn: No such file or directory, and every obvious way of fixing that collides with something already installed.

  • brew install yarn is 1.22, which cannot read a __metadata: version 6 lockfile and has no --no-immutable.
  • brew install corepack wants to unlink the Brewfile's pnpm — the formulae both own pnpm and pnpx.
  • npm i -g corepack fails the same way, EEXIST /opt/homebrew/bin/pnpm.

So make apps installs corepack under its own prefix, where its pnpm and pnpx shims are out of everyone's way, and links only yarn, yarnpkg and corepack into ~/.local/bin. Homebrew's pnpm stays exactly where it was. Nothing here pins a yarn version — corepack reads each project's packageManager field, so a repo asking for yarn@4.7.0 gets 4.7.0.

Two supporting bits: .bashrc now puts ~/.local/bin on PATH, because Ubuntu's ~/.profile only does that if the directory existed at login and on a machine being set up it did not (macOS already had the line in os/macos/.zshrc); and the Brewfile says next to pnpm why yarn has no line of its own there.

Verified by running the recipe against a throwaway $HOME: the three shims appear, no pnpm shim does, and yarn --version in a project pinned to 4.7.0 prints 4.7.0. make qa passes.

@landsman landsman changed the title devops: yarn berry from corepack, parked where it cannot clobber pnpm dev: yarn berry from corepack, parked where it cannot clobber pnpm Aug 12, 2026
@landsman
landsman merged commit 6ed9067 into main Aug 12, 2026
3 checks passed
@landsman
landsman deleted the yarn branch August 12, 2026 12:59
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.

1 participant