From 8cd998de68a76092e35b28582b372d0ce51efdaa Mon Sep 17 00:00:00 2001 From: stamsam Date: Sat, 23 May 2026 00:57:43 -0400 Subject: [PATCH] docs(windows): add npm global path fix (#1272) --- docs/non-technical-setup.md | 17 +++++++++++++++++ docs/quick-start-windows.md | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/docs/non-technical-setup.md b/docs/non-technical-setup.md index 498446fb0..d2b3dec14 100644 --- a/docs/non-technical-setup.md +++ b/docs/non-technical-setup.md @@ -78,6 +78,7 @@ At that point, you can ask it to: Cause: - npm installed the package, but your terminal has not refreshed yet +- on Windows, npm's global bin folder may not be in your user `Path` Fix: @@ -85,6 +86,22 @@ Fix: 2. Open a new terminal 3. Run `openclaude` again +On Windows PowerShell, if that still does not work, add npm's global bin folder +to your user `Path`, then open a new PowerShell window: + +```powershell +$npmPrefix = npm config get prefix +$currentUserPath = [Environment]::GetEnvironmentVariable("Path", "User") + +if (($currentUserPath -split ';') -notcontains $npmPrefix) { + [Environment]::SetEnvironmentVariable( + "Path", + "$currentUserPath;$npmPrefix", + "User" + ) +} +``` + ### Invalid API key Cause: diff --git a/docs/quick-start-windows.md b/docs/quick-start-windows.md index c35296216..0b93f48b1 100644 --- a/docs/quick-start-windows.md +++ b/docs/quick-start-windows.md @@ -103,6 +103,23 @@ Close PowerShell, open a new one, and try again: openclaude ``` +If PowerShell still says `openclaude` is not recognized, npm's global bin +folder may be missing from your user `Path`. Add it, then open a new +PowerShell window: + +```powershell +$npmPrefix = npm config get prefix +$currentUserPath = [Environment]::GetEnvironmentVariable("Path", "User") + +if (($currentUserPath -split ';') -notcontains $npmPrefix) { + [Environment]::SetEnvironmentVariable( + "Path", + "$currentUserPath;$npmPrefix", + "User" + ) +} +``` + ## 5. If Your Provider Fails Check the basics: