Repository navigation
Description
Symptom
In .github/workflows/zcode-runtime-release.yml, the Build the integrated CLI with the official script step sometimes fails during upstream's pnpm install --frozen-lockfile:
ERR_PNPM_ENOENT ENOENT: no such file or directory, rename 'node_modules/tsup/node_modules/_tmp_2844_d5dc495514e2932074b0ea51a496a993' -> 'node_modules/tsup/node_modules/esbuild'
Rerunning the failed job passes. Nothing is published when the build fails, because the verify and publish jobs depend on it.
Occurrences
Every build used the same inputs:
- ZCode
v3.17.2(a9fe401). - pnpm 10.33.2 and Node.js 24.21.0.
- The
ubuntu-24.04image, version 20261028.624.
| Run | Attempt | Result |
|---|---|---|
| 42575657986 (PR #95) | 1 | passed |
42576870272 (tag zcode-runtime-v3.17.2-paseo.1) |
1 | passed |
| 42578515834 (PR #95) | 1 | failed: job 129031551297, tsup/node_modules/esbuild |
| 42578515834 | 2 | failed: job 129034088570, tsup/node_modules/esbuild |
| 42578515834 | 3 | passed |
| 42581343079 (PR #95) | 1 | failed: job 129040534313, react-scan/node_modules/esbuild |
| 42581343079 | 2 | passed |
Three of seven builds of this source failed. Every earlier run of this workflow, on the 3.14.3 and 3.16.2 sources, passed on its first attempt.
Likely cause
The failure matches pnpm/pnpm#12880, which involves nodeLinker: hoisted:
- The pnpm bug. Copying a built package to its other hoisted locations replaced the destination directory. Concurrent copies of the same build then failed with this
rename '.../_tmp_...'error. - Why it applies to ZCode. ZCode sets
node-linker=hoistedin.npmrc, and listsesbuildinallowBuilds. Both failing paths are nested esbuild copies. - Where it was fixed. pnpm/pnpm#14242 fixed it, and the fix shipped in pnpm 11.25.0. The release notes of pnpm 10.34.6 to 10.34.9, the 10.x releases after the fix, do not mention it.
- Why we are affected. The workflow uses pnpm 10.33.2, matching ZCode's
packageManager.
Why it started with 3.17.2 is not known. Both baselines lock the same esbuild versions (0.25.12 and 0.27.7). The dependency graph around them grew; for example, tsup and react-scan lock entries went from 2 to 4.
Impact
- PR builds. A PR that touches the packaging, the patches or
check-stdio-runtime.mjscan show a failed Build runtime archive check that is unrelated to the change. - Tag builds. A failed tag build publishes nothing. Rerunning its failed jobs publishes the release as usual.
- Released runtime. The published
3.17.2-paseo.1is unaffected; it was built by run 42576870272.
Options (not decided)
- Keep rerunning failed jobs. This is the current practice, recorded in
docs/verification.md. - Build with pnpm 11.25.0 or later. This departs from upstream's pinned
packageManager. We would need to check that pnpm 11 accepts the lockfile with--frozen-lockfileand produces an equivalent build. - Wait for upstream. ZCode may move to a pnpm release that has the fix.
An automatic retry in the workflow would hide the race rather than fix it, so none was added.
Activity