Skip to content

fix(installer): correct npm global bin path on Windows#66

Closed
openperf wants to merge 1 commit intoopenclaw:mainfrom
openperf:fix/windows-installer-path
Closed

fix(installer): correct npm global bin path on Windows#66
openperf wants to merge 1 commit intoopenclaw:mainfrom
openperf:fix/windows-installer-path

Conversation

@openperf
Copy link

Summary

This PR fixes an issue in the PowerShell installer (public/install.ps1) where the incorrect path for npm's global binaries was being added to the user's PATH on Windows.

  • On Windows, npm config get prefix returns the directory where executables are located (e.g., %APPDATA%\npm), not a parent directory. The script was incorrectly appending \bin to this path, a convention that only applies to Unix-like systems.
  • This change corrects the logic to use the npm config get prefix output directly as the binary path, ensuring openclaw is found after installation.
  • The Expected path: message shown to the user on failure has also been corrected to reflect the actual path without the \bin suffix.

Test Plan

This change can be manually verified on a Windows machine:

  1. Run the modified installer script: iwr -useb <your-raw-script-url> | iex
  2. Observe the output. It should now correctly identify and add the ...\npm directory to the PATH.
  3. After restarting the terminal, openclaw --version should execute successfully.

Fixes openclaw/openclaw#19921

@vercel
Copy link

vercel bot commented Feb 18, 2026

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

A member of the Team first needs to authorize it.

@steipete
Copy link
Contributor

steipete commented Mar 2, 2026

Thanks for the contribution. Closing as duplicate of #80, which applies the same Windows npm prefix/path correction.

If you want, feel free to rebase and contribute additional non-overlapping installer improvements.

@steipete steipete closed this Mar 2, 2026
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

2 participants