Three platforms, one boundaryELF, binary-looking MZ, shell syntax, and executable-loader errors all occur before TypeScript, Vite, Vitest, or a workspace package starts.

One assumption, four runners.

Buildbuild.ts

Nested library and Web scripts.

Gatesrun-gates.ts

Check and CI aggregates.

Testssnapshots + coverage

Both hardcode the Node wrapper.

Recover with an exact JavaScript entrypoint.

corepack prepare pnpm@11.7.0 --activate
corepack pnpm exec node -p "process.env.npm_execpath"
corepack pnpm install --frozen-lockfile
corepack pnpm run build

Continue only when the probe ends in .js, .cjs, or .mjs. rc.8 also requires Node ^22.19.0 or >=24.0.0.

Do not make shell: true the universal fix.

JavaScript entries need Node; native binaries and POSIX shebang launchers run directly; Windows command shims need an explicit documented branch.

Restore the complete gate chain.

Identity

Exact Node, pnpm, commit, and entrypoint.

Build

Library and Web artifacts complete.

Contracts

Type and invariant gates pass.

Tests

Gates, coverage, and Web snapshots run.

Primary evidence.

Keep the entrypoint matrix.

The complete runbook covers both observed signatures, diagnostics, bounded recovery, four affected runners, unsafe shortcuts, neighboring pnpm failures, and twelve upstream regression gates.

Read the complete runbook