Windows: installer fails and PowerShell closes before you can read the error
Recover from Windows install/bootstrap failures where the one-liner closes PowerShell too quickly by switching to a readable manual install path and validating Node/npm first.
Symptoms
- You try the Windows one-liner installer and the terminal closes before you can read the real error.
- Screen capture reveals an error like:
Could not find a package manager (winget, choco, or scoop)Please install Node.js 24 (recommended) or Node.js 22.19+ manually
- You are not sure whether OpenClaw failed, Node is missing, or the bootstrapper itself failed.
Cause
This is usually not a gateway/runtime bug yet. It is an installer/bootstrapper failure on Windows.
The one-liner is convenient, but it hides too many variables when:
- Windows package managers are unavailable,
- Node.js is not installed yet,
- or PowerShell exits before you can inspect the failure.
Fix
1) Stop using the one-liner for this machine until the basics are verified
If the bootstrapper closes too quickly, switch to a manual path so the error stays visible.
2) Install Node.js 24 recommended / Node.js 22.19+ supported manually first
Use the official installer from nodejs.org. Prefer Node.js 24 for new installs; Node.js 22.19+ remains supported. Then open a fresh PowerShell and verify:
node -v
npm -v
If either command is missing, fix Node before continuing.
3) Install OpenClaw with npm directly
npm install -g openclaw@latest
openclaw --version
openclaw doctor
This gives you readable output and makes it much easier to tell whether the real problem is:
- Node/npm,
- Windows PATH,
- or OpenClaw itself.
4) If Windows is already feeling shaky, decide whether WSL2 fits this machine
If you are on a fresh machine and already hitting Windows-native installer friction, read:
WSL2 can be the lower-risk path if you want a more Linux-like service model, but it is not mandatory for every Windows install. Stay native if your Node/npm/PATH checks are clean and you need native Windows integration.
Verify
Run these in a fresh PowerShell:
node -v
npm -v
where openclaw
openclaw --version
openclaw doctor
You should be able to read the full output without the terminal disappearing.