Description
When running create-oxygen-wp from PowerShell on native Windows, the installer fails after collecting the project details and attempting to start the initial setup.
Environment
- Windows 11
- PowerShell
- Node.js
24.18.0
- npm
12.0.1
create-oxygen-wp 0.2.0
create-katalystwp 0.8.0
- Docker Desktop
4.83.0
- Docker Engine
29.6.2
- Git Bash installed
Steps to reproduce
Run:
npm create oxygen-wp@latest
Then:
- Enter a site name.
- Select a Windows directory.
- Choose Claude Code as the AI agent.
- Allow the installer to start the initial setup.
Actual result
The installer fails with:
Error: spawn EINVAL
at ChildProcess.spawn (node:internal/child_process:441:11)
at spawn (node:child_process:796:9)
at create-katalystwp/engine.js
The npm process finishes with:
npm error code 1
npm error command failed
npm error command C:\WINDOWS\system32\cmd.exe /d /s /c create-oxygen-wp
Docker itself is running correctly. Both the Docker client and server are available from PowerShell.
Expected result
The installer should scaffold the project and complete the initial setup successfully on native Windows.
Likely cause
It appears that create-katalystwp attempts to launch npm.cmd using child_process.spawn() without a shell.
On Windows, .cmd files need to be launched through cmd.exe or with an appropriate shell configuration.
A possible fix could be:
spawn(command, args, {
shell: process.platform === "win32",
...options
});
Working workaround
The installation succeeds when the project is scaffolded without automatically starting the setup:
npx --yes create-oxygen-wp@latest winsan-oxy-v1 --agents=claude --scaffold-only --yes
Then Git Bash can be explicitly added to the current PowerShell session:
$env:Path = "C:\Program Files\Git\bin;C:\Program Files\Git\cmd;$env:Path"
After entering the generated project directory:
Set-Location "C:\katalyst-sites\winsan-oxy-v1"
npm run setup
The setup then completes successfully.
Additional note
On Windows, the bash command may resolve to the WSL launcher instead of Git Bash. In my case, I had to make sure the following executable was used:
C:\Program Files\Git\bin\bash.exe
It would be helpful if native Windows and PowerShell execution worked without requiring --scaffold-only and a manual setup step.
Description
When running
create-oxygen-wpfrom PowerShell on native Windows, the installer fails after collecting the project details and attempting to start the initial setup.Environment
24.18.012.0.1create-oxygen-wp0.2.0create-katalystwp0.8.04.83.029.6.2Steps to reproduce
Run:
Then:
Actual result
The installer fails with:
The npm process finishes with:
Docker itself is running correctly. Both the Docker client and server are available from PowerShell.
Expected result
The installer should scaffold the project and complete the initial setup successfully on native Windows.
Likely cause
It appears that
create-katalystwpattempts to launchnpm.cmdusingchild_process.spawn()without a shell.On Windows,
.cmdfiles need to be launched throughcmd.exeor with an appropriate shell configuration.A possible fix could be:
Working workaround
The installation succeeds when the project is scaffolded without automatically starting the setup:
Then Git Bash can be explicitly added to the current PowerShell session:
After entering the generated project directory:
The setup then completes successfully.
Additional note
On Windows, the
bashcommand may resolve to the WSL launcher instead of Git Bash. In my case, I had to make sure the following executable was used:It would be helpful if native Windows and PowerShell execution worked without requiring
--scaffold-onlyand a manual setup step.