What happened?
pnpm run build fails on Windows while bundling @step-harness/coding-agent. TypeScript compilation and copy-assets finish, then scripts/build-coding-agent-bundle.mjs exits with spawnSync npm ENOENT.
Environment: Windows 10 (10.0.26200), Node.js v24.14.1, pnpm 9.15.9, package @step-harness/coding-agent@0.84.4 at commit 8297eb5.
node:internal/child_process:1119
result.error = new ErrnoException(result.error, 'spawnSync ' + options.file);
^
Error: spawnSync npm ENOENT
code: 'ENOENT',
syscall: 'spawnSync npm',
path: 'npm',
spawnargs: [
'--prefix',
'D:\\code\\git-project\\Step-Code\\apps\\cli',
'run',
'build'
]
}
The stack points at execFileSync("npm", ["--prefix", appEntryDir, "run", "build"], ...) in scripts/build-coding-agent-bundle.mjs.
Earlier npm run build steps in the same pnpm run build succeed, because pnpm launches them through cmd.exe /c. execFileSync does not use a shell and does not search PATHEXT, so it looks for a file named npm. On Windows the executable is npm.cmd.
Steps to reproduce
- Clone the repo on Windows and run
pnpm install --ignore-scripts.
- Run
pnpm run build from the repository root.
Expected behavior
pnpm run build completes, including the CLI compile started by the coding-agent bundle script.
What happened?
pnpm run buildfails on Windows while bundling@step-harness/coding-agent. TypeScript compilation andcopy-assetsfinish, thenscripts/build-coding-agent-bundle.mjsexits withspawnSync npm ENOENT.Environment: Windows 10 (10.0.26200), Node.js v24.14.1, pnpm 9.15.9, package
@step-harness/coding-agent@0.84.4at commit8297eb5.The stack points at
execFileSync("npm", ["--prefix", appEntryDir, "run", "build"], ...)inscripts/build-coding-agent-bundle.mjs.Earlier
npm run buildsteps in the samepnpm run buildsucceed, because pnpm launches them throughcmd.exe /c.execFileSyncdoes not use a shell and does not searchPATHEXT, so it looks for a file namednpm. On Windows the executable isnpm.cmd.Steps to reproduce
pnpm install --ignore-scripts.pnpm run buildfrom the repository root.Expected behavior
pnpm run buildcompletes, including the CLI compile started by the coding-agent bundle script.