Summary
On Windows (Node 24.18.0), the local dev pool cannot install/build plugins:
scripts/dev/deps.ts calls run("npm", ["install"], ...) and run("npm", ["run","build"], ...)
through scripts/dev/lib/proc.ts. On Windows, npm resolves to npm.cmd, and Node's
child_process.spawn cannot execute it directly:
spawn("npm", ...) -> ENOENT (bare npm is not an executable on Windows)
spawn("npm.cmd", ...) -> EINVAL on Node 24.18.0 (regression: .cmd files can no longer be spawned directly without a shell; Node 24.18 also rejects the shell:true-less .cmd spawn with EINVAL)
Empirical matrix (Node v24.18.0, win-x64):
| call |
result |
spawn("npm") |
ENOENT |
spawn("npm.cmd") |
EINVAL |
spawn("cmd.exe", ["/d","/s","/c","npm.cmd", ...]) |
works (npm 11.16.0, exit 0) |
spawn(cmd, args, {shell:true}) |
works (deprecated) |
Observed failure during node scripts/dev/cli.ts up --no-slack:
deps: fail -- npm install failed in .../plugins/web-ui: spawn npm ENOENT
Suggested fix (minimal, local)
In scripts/dev/lib/proc.ts, resolve the command against PATH on win32
(npm -> npm.cmd, tsx -> tsx.cmd, etc.) and spawn .cmd/.bat via
cmd.exe /d /s /c <resolved> <args...>; leave .exe/.com and non-Windows
behavior unchanged. This keeps a single spawn choke point and fixes both
deps.ts npm calls and any other bare-command child spawns on Windows.
Verified locally with this change: pool boot completes (deps: ok, children
core/web/admin/portal all ok) on Windows with Node 24.18.0.
Environment
- OS: Windows 10/11 (NT 10.0.26200)
- Node: v24.18.0 (official win-x64 build); npm 11.16.0
- QM pin: b702813
Summary
On Windows (Node 24.18.0), the local dev pool cannot install/build plugins:
scripts/dev/deps.tscallsrun("npm", ["install"], ...)andrun("npm", ["run","build"], ...)through
scripts/dev/lib/proc.ts. On Windows,npmresolves tonpm.cmd, and Node'schild_process.spawncannot execute it directly:spawn("npm", ...)->ENOENT(barenpmis not an executable on Windows)spawn("npm.cmd", ...)->EINVALon Node 24.18.0 (regression:.cmdfiles can no longer be spawned directly without a shell; Node 24.18 also rejects theshell:true-less.cmdspawn with EINVAL)Empirical matrix (Node v24.18.0, win-x64):
spawn("npm")spawn("npm.cmd")spawn("cmd.exe", ["/d","/s","/c","npm.cmd", ...])spawn(cmd, args, {shell:true})Observed failure during
node scripts/dev/cli.ts up --no-slack:Suggested fix (minimal, local)
In
scripts/dev/lib/proc.ts, resolve the command against PATH on win32(
npm->npm.cmd,tsx->tsx.cmd, etc.) and spawn.cmd/.batviacmd.exe /d /s /c <resolved> <args...>; leave.exe/.comand non-Windowsbehavior unchanged. This keeps a single spawn choke point and fixes both
deps.tsnpm calls and any other bare-command child spawns on Windows.Verified locally with this change: pool boot completes (
deps: ok, childrencore/web/admin/portal all
ok) on Windows with Node 24.18.0.Environment