Skip to content

fix(install): use npm prefix directly on Windows, not prefix/bin#80

Open
arosstale wants to merge 1 commit intoopenclaw:mainfrom
arosstale:fix/19921-windows-path-mismatch
Open

fix(install): use npm prefix directly on Windows, not prefix/bin#80
arosstale wants to merge 1 commit intoopenclaw:mainfrom
arosstale:fix/19921-windows-path-mismatch

Conversation

@arosstale
Copy link

What

On Windows, npm config get prefix returns e.g. C:\Users\User\AppData\Roaming\npm and binaries like openclaw.cmd live directly in that folder.

The installer was appending \bin (a Unix convention), so it added ...\npm\bin to PATH — but the executable was at ...\npm. Result: openclaw not found after install.

Fix

Use $npmPrefix directly instead of Join-Path $npmPrefix "bin". Also fix the "Expected path" hint message.

Diff

3 lines changed in public/install.ps1.

Testing

Confirmed on Windows 11 with Node 22 + npm 10:

  • npm config get prefixC:\Users\Artale\AppData\Roaming\npm
  • openclaw.cmd lives at C:\Users\Artale\AppData\Roaming\npm\openclaw.cmd (no bin/ subfolder)

Fixes openclaw/openclaw#19921

On Windows, npm global binaries live in the prefix directory itself
(e.g. C:\Users\User\AppData\Roaming\npm\openclaw.cmd), not in a
bin/ subfolder. The bin/ convention is Unix-only.

The installer was adding ...\npm\bin to PATH, but the executable
was at ...\npm — so openclaw was never found on PATH after install.

Fixes openclaw/openclaw#19921
@vercel
Copy link

vercel bot commented Feb 25, 2026

@arosstale is attempting to deploy a commit to the Jamie's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Windows 11 PATH mismatch for one-liner installer

1 participant