Describe the bug
Trying building Vite repo fails patching dist CJS:

Reproduction
run pnpm run build in this repo
System Info
System:
OS: Windows 10 10.0.19044
CPU: (16) x64 Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz
Memory: 39.14 GB / 63.95 GB
Binaries:
Node: 16.13.0 - C:\Program Files\nodejs\node.EXE
npm: 8.1.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: 103.0.5060.134
Edge: Spartan (44.19041.1266.0), Chromium (103.0.1264.62)
Internet Explorer: 11.0.19041.1566
Used Package Manager
pnpm
Logs
Click to expand!
F:\work\projects\quini\GitHub\vite-new-hooks-symlinks\vite\packages\plugin-legacy:
ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL @vitejs/plugin-legacy@2.0.0 build: `unbuild && pnpm run patch-cjs`
Exit status 1
ELIFECYCLE Command failed with exit code 1.
Validations
Describe the bug
Trying building Vite repo fails patching dist CJS:

Reproduction
run
pnpm run buildin this repoSystem Info
System: OS: Windows 10 10.0.19044 CPU: (16) x64 Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz Memory: 39.14 GB / 63.95 GB Binaries: Node: 16.13.0 - C:\Program Files\nodejs\node.EXE npm: 8.1.0 - C:\Program Files\nodejs\npm.CMD Browsers: Chrome: 103.0.5060.134 Edge: Spartan (44.19041.1266.0), Chromium (103.0.1264.62) Internet Explorer: 11.0.19041.1566Used Package Manager
pnpm
Logs
Click to expand!
Validations