[Bug?]: Failed to open the cache entry for.. Couldn't allocate enough memory with pnpm and pnp linkers
Self-service
- [ ] I'd be willing to implement a fix
Describe the bug
Switching from node-modules linker to pnpm or pnp causes this error:
➤ YN0000: ┌ Link step ➤ YN0001: │ Error: Failed to open the cache entry for @next/swc-darwin-x64@npm:14.1.4: Couldn't allocate enough memory at Zi.allocateBuffer (/Users/paulnispel/src/bb/basicblock/.yarn/releases/yarn-4.7.0.cjs:149:204603)
have tried on many version of yarn and many version of node and get the same error.
nodeLinker: pnpm
yarnPath: .yarn/releases/yarn-4.7.0.cjs
To reproduce
Large monorepo with many packages?
Environment
System:
OS: macOS 15.3.2
CPU: (10) arm64 Apple M1 Max
Binaries:
Node: 23.10.0 - /private/var/folders/r2/v37zv37558d949_l3rw575qr0000gn/T/xfs-1c10319b/node
Yarn: 4.7.0 - /private/var/folders/r2/v37zv37558d949_l3rw575qr0000gn/T/xfs-1c10319b/yarn
npm: 10.9.2 - ~/.nvm/versions/node/v23.10.0/bin/npm
npmPackages:
jest: 29.7.0 => 29.7.0
Additional context
No response
I'm seeing this too with nodeLinker: node-modules in a large monorepo when upgrading from 4.2.2 -> 4.8.0 (self hosted GH runners).
Edit: doesn't occur for me on 4.7.0. Will provide more details in a separate report when I can!
@MorrisonCole can you run yarn set version from sources --branch 6743 (https://github.com/yarnpkg/berry/pull/6743) and try again?
Hey @arcanis - thanks for taking a look so quickly!
Can confirm that we don't see the issue with #6743 🎉