#node error
1 messages · Page 1 of 1 (latest)
npm error code 1 is just the generic “something failed” exit code — the important part is the next npm ERR! ... lines (and the log file path).
Two super common causes on Windows for this exact spot in the installer:
1) Git is installed but not on PATH (in this PowerShell)
In the same PowerShell window you run the installer, paste:
git --version
where.exe git
If either of those fails / shows nothing: reinstall Git for Windows and make sure you check “Add Git to PATH”, then close + reopen PowerShell and try again.
2) You already have OpenClaw running, so npm can’t overwrite files (Windows file-locking)
If you previously started OpenClaw, stop it first (or just reboot), then rerun the installer.
If openclaw is recognized, run:
openclaw gateway stop
Get the real error (so we can tell you the fix)
Run this and paste the output (especially the npm ERR! section and the “log file” line):
npm install -g openclaw@latest --loglevel verbose
If it prints a log path, also paste the last ~80 lines of that log:
Get-Content "$env:LOCALAPPDATA\npm-cache\_logs\*.log" -Tail 80
Docs refs:
- More installer debug: https://docs.openclaw.ai/help/faq#installer-stuck-how-do-i-get-more-feedback
- Windows notes / WSL2 recommended path: https://docs.openclaw.ai/platforms/windows
Git is fine — the important clue is this:
Cannot find module 'C:\...\node_modules\openclaw\openclaw.mjs'
That means your openclaw command shim exists, but the actual global openclaw package files are missing (usually from a half-failed npm install or switching Node versions with a Windows Node manager).
Step 1: show where openclaw is coming from
Run these and paste output:
where.exe openclaw
where.exe node
where.exe npm
npm -v
npm config get prefix
Step 2: clean reinstall the global package
Then run:
npm uninstall -g openclaw
npm cache verify
npm install -g openclaw@latest
openclaw --version
If npm uninstall -g openclaw says it’s not installed but where openclaw still finds an openclaw.cmd, then it’s a leftover shim. In that case paste the where openclaw path and I’ll tell you exactly which file to delete (manually) and where.
About the log link
That Google Doc requires sign-in so I can’t view it. Instead, paste just the bottom ~30 lines around the failure from the npm log (the lines starting with npm ERR!), plus the line that says where the log file is located. That’s enough to pinpoint the real reason for npm error code 1.
(Also: Windows native can be finicky; the recommended path is WSL2: https://docs.openclaw.ai/platforms/windows — but we can likely fix your current install without switching if you want.)
Yep, this explains it: you’ve got multiple openclaw executables on PATH (4 hits), and at least one of them is a broken shim pointing at a package that isn’t there anymore:
C:\nvm4w\nodejs\openclaw(.cmd)→ tries to load...\node_modules\openclaw\openclaw.mjs→ MODULE_NOT_FOUND- plus another set in
%AppData%\npm\openclaw(.cmd)
That’s why openclaw gateway stop can’t run and why the installer gets weird.
Fix: remove the broken shims, then reinstall once
A) Uninstall (if npm thinks it’s installed)
Run:
npm uninstall -g openclaw
npm root -g
npm prefix -g
B) Delete the leftover openclaw shims (the 4 paths from where openclaw)
In PowerShell:
Remove-Item -Force "C:\nvm4w\nodejs\openclaw","C:\nvm4w\nodejs\openclaw.cmd" -ErrorAction SilentlyContinue
Remove-Item -Force "$env:APPDATA\npm\openclaw","$env:APPDATA\npm\openclaw.cmd" -ErrorAction SilentlyContinue
(Those are just the launchers; you’re not deleting Node or Git.)
Also remove any half-installed module folder:
$root = npm root -g
Remove-Item -Recurse -Force "$root\openclaw" -ErrorAction SilentlyContinue
C) Reinstall
npm cache verify
npm install -g openclaw@latest --loglevel verbose
openclaw --version
About the Google Doc log
I can’t open Google Docs links that require sign-in, so I can’t see that log. If the reinstall still fails, paste just the last ~30 lines from your PowerShell output (everything starting at npm ERR!) + the line that shows the log file path. That will fit in Discord and will tell us the real cause (permissions/EPERM, antivirus, node manager weirdness, etc.).
this gave no output Remove-Item -Force "C:\nvm4w\nodejs\openclaw","C:\nvm4w\nodejs\openclaw.cmd" -ErrorAction SilentlyContinue
Remove-Item -Force "$env:APPDATA\npm\openclaw","$env:APPDATA\npm\openclaw.cmd" -ErrorAction SilentlyContinue
No output there is totally normal — Remove-Item is silent on success, and you also used -ErrorAction SilentlyContinue (so it’ll be silent even if it fails).
Let’s verify whether the shims are actually gone.
1) Check what still exists
Run:
where.exe openclaw
- If it says it can’t find
openclawanymore → perfect, continue to reinstall. - If it still prints paths → we’ll delete exactly those.
2) Re-run delete, but show what happened (Verbose + no SilentlyContinue)
Copy/paste this (single block):
$paths = @(
"C:\nvm4w\nodejs\openclaw",
"C:\nvm4w\nodejs\openclaw.cmd",
"$env:APPDATA\npm\openclaw",
"$env:APPDATA\npm\openclaw.cmd"
)
foreach ($p in $paths) {
if (Test-Path $p) {
Remove-Item -Force -Verbose $p
} else {
Write-Host "missing: $p"
}
}
where.exe openclaw
3) Reinstall once where openclaw is clean
npm install -g openclaw@latest
openclaw --version
If where.exe openclaw still shows something after that script, paste the output (just the paths) and I’ll tell you which specific leftover file is still shadowing it.
I can’t read that Google Doc link (it’s hitting the Google “Sign in to continue” page on my side), so I’m blind again.
Can you do one of these instead?
Option A (best): paste the last error lines directly
Run:
npm install -g openclaw@latest --loglevel verbose 2>&1 | Select-Object -Last 40
…and paste that output here. 40 lines usually fits Discord and includes the real npm ERR! reason.
Option B: paste from the npm log file (most reliable)
First find the newest log:
Get-ChildItem "$env:LOCALAPPDATA\npm-cache\_logs\*.log" | Sort-Object LastWriteTime -Descending | Select-Object -First 1
Then tail it:
Get-Content "PASTE_THE_LOG_PATH_HERE" -Tail 60
Also: confirm the broken shims are gone
Please paste:
where.exe openclaw
If where openclaw still shows anything under C:\nvm4w\nodejs\... and %AppData%\npm\..., we need to clean that first (otherwise you’ll keep running the wrong/broken launcher even after reinstall).
why would you not tell me you couldent read them in the last two prompts?
Because I didn’t know they were unreadable until I actually tried to fetch them.
Google Docs often looks “shared” but still requires a Google sign-in (or blocks bots). When I opened your earlier links, all I got back was the “Sign in to continue to Google Docs” page — no log content — so there was nothing useful for me to quote back to you.
If you paste the error text directly here, I can work with it. Easiest:
npm install -g openclaw@latest --loglevel verbose 2>&1 | Select-Object -Last 40
where.exe openclaw
Paste those outputs and we’ll get you unstuck.
is there anywhere else i can send it?
Yes — a few options that work well:
1) Best: paste just the tail in Discord (it’s usually enough)
This keeps it small and includes the real error:
npm install -g openclaw@latest --loglevel verbose 2>&1 | Select-Object -Last 40
(If that still overflows, change 40 to 25.)
2) Pastebin / GitHub Gist (public or unlisted)
- Pastebin: https://pastebin.com/
- Gist: https://gist.github.com/
Tip: before pasting, search the log for secrets and remove anything like tokens/keys. (npm logs usually don’t include them, but good habit.)
3) Upload the log as a file to Discord
Save the log to a text file and upload it:
npm install -g openclaw@latest --loglevel verbose 2>&1 | Tee-Object -FilePath "$env:TEMP\openclaw-install.log"
Then upload: C:\Users\<you>\AppData\Local\Temp\openclaw-install.log
4) If you must use Google Docs/Drive
Make it “Anyone with the link can view” (no sign-in). Right now it’s requiring sign-in on my side.
Also please include this tiny check (helps a lot and fits):
where.exe openclaw
can you read this? https://hypernotepad.com/n/82b6405a4040fcda
Yep — I can read that HyperNotepad link.
Your install is failing because npm is trying to auto-install the peer dependency node-llama-cpp, and its postinstall blows up on Windows:
Ă— Failed to download cmake- then it tries to build from source
- and dies with:
'xpm' is not recognized as an internal or external command - so npm exits with
code 1, and OpenClaw never finishes installing → you keep the brokenopenclaw.mjsshim error afterwards.
Quick fix (recommended): install OpenClaw without peer deps
This skips node-llama-cpp entirely (you can still use OpenClaw normally with cloud models; you just won’t have the “local llama.cpp” features on native Windows).
Run:
npm uninstall -g openclaw node-llama-cpp
npm install -g openclaw@latest --legacy-peer-deps
openclaw --version
where.exe openclaw
If where.exe openclaw still shows multiple paths, paste that output and we’ll remove the leftover one(s) so you’re not running an old broken shim.
If you specifically want local llama.cpp on Windows
That’s a bigger setup (build tools / cmake toolchain). Honestly the smooth path is WSL2 on Windows: https://docs.openclaw.ai/platforms/windows
Once you run the --legacy-peer-deps install, tell me what openclaw --version prints and what where.exe openclaw shows.
so ill be able to use everything but local models?
Pretty much, yes.
Installing with --legacy-peer-deps is mainly to avoid npm trying to pull/build node-llama-cpp, which is the piece that enables llama.cpp-style local model features (and it’s what’s failing on your Windows box).
You’ll still be able to use:
- the Gateway + onboarding
- Discord/Telegram/etc channels
- tools like web search/fetch, browser (where supported), exec (where supported), cron, memory (cloud-backed), etc.
- cloud model providers (Anthropic/OpenAI/OpenRouter/etc) as normal
What you won’t have (until you get node-llama-cpp working) is the local llama.cpp runtime / local memory search provider stuff that depends on it.
If your goal is “I just want OpenClaw running”, this is the right move. If your goal is “I want local-only models on Windows”, I’d strongly steer you to WSL2 for that.
well i want it to still be able to use memory
Yes — memory still works even if you skip local models.
There are two different “memory” things:
-
Memory storage (always works):
OpenClaw memory is just Markdown files in your workspace (memory/YYYY-MM-DD.md, optionallyMEMORY.md). The bot can still write/read those normally. -
Semantic “memory search” (the fancy recall):
That’s the part that can be either:
- local (uses
node-llama-cpp→ what’s failing on your Windows install), or - remote embeddings (does not need local models, but it does require an API key for an embeddings provider).
From your log, if you install OpenClaw without node-llama-cpp, you can still have memory search by configuring an embeddings key (OpenAI/Gemini/Voyage). Important nuance: Codex/ChatGPT OAuth does not cover embeddings, so you’ll still need an embeddings API key for semantic search to turn on.
If you tell me which provider you plan to use for embeddings (OpenAI vs Gemini etc.), I can point you at the exact config/CLI command to enable memory search after you get OpenClaw installed.
ok just tell me how to do the wsl thing or wtv
WSL2 is the clean way on Windows. Do this:
1) Install WSL2 + Ubuntu
Open PowerShell as Administrator and run:
wsl --install -d Ubuntu-24.04
Reboot if Windows asks.
Then open Ubuntu 24.04 from the Start menu and finish the first-time Linux user setup.
(Official Microsoft guide if needed: https://learn.microsoft.com/windows/wsl/install)
2) Enable systemd in WSL (needed for --install-daemon)
In the Ubuntu (WSL) terminal:
sudo tee /etc/wsl.conf >/dev/null <<'EOF'
[boot]
systemd=true
EOF
Back in PowerShell:
wsl --shutdown
Then reopen Ubuntu.
Quick sanity check (in Ubuntu):
systemctl --user status
3) Install OpenClaw inside WSL (recommended path)
In Ubuntu (WSL):
curl -fsSL https://openclaw.ai/install.sh | bash
openclaw onboard --install-daemon
Then:
openclaw gateway status
openclaw dashboard
You can also just open the Control UI from Windows at:
http://127.0.0.1:18789/ (WSL usually forwards localhost ports automatically).
Docs reference: https://docs.openclaw.ai/platforms/windows
If you paste what openclaw gateway status shows after onboarding, I can confirm you’re fully up.
theres no output for wsl --install -d Ubuntu-24.04
wsl --install ... should normally print something (or at least take a bit while it downloads). If it instantly returns with no output, two likely cases: (a) WSL is already installed / partially configured, or (b) your Windows build doesn’t support that flag.
Can you run these in PowerShell (Windows) and paste the output?
wsl --version
wsl --status
wsl --list --verbose
echo $LASTEXITCODE
Also: make sure you’re running PowerShell as Administrator (Start menu → “Windows PowerShell” → Run as administrator). If wsl --version errors or is missing, tell me what it prints and I’ll give you the “older Windows” install steps (enable WSL + Virtual Machine Platform + reboot).
i cant open ubunntu
If you can’t open Ubuntu at all, that usually means the Ubuntu distro never got installed, or WSL isn’t enabled / virtualization isn’t available.
1) First, tell me what WSL thinks is installed
In PowerShell (as Administrator) run:
wsl -l -v
wsl --status
Paste the output (or the exact error).
2) If it shows “no installed distributions”
Install one of these two ways:
A) Microsoft Store (most reliable UI path)
- Open Microsoft Store → search “Ubuntu 24.04 LTS” → Install
- Then run it once from Start menu
B) CLI
wsl --list --online
wsl --install -d Ubuntu-24.04
If Ubuntu-24.04 isn’t listed, install Ubuntu or Ubuntu-22.04 instead.
3) If WSL errors about features not enabled
Run (Admin PowerShell), then reboot:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
shutdown /r /t 0
After reboot, try launching Ubuntu again (or wsl -d Ubuntu).
Tell me what you get from wsl -l -v / wsl --status and I’ll point you to the next exact step.
nvm i was able to do it, i restarted my computer what do i do know?
Nice — after the reboot, do everything inside Ubuntu (WSL) now.
1) Open Ubuntu
Start Menu → Ubuntu (or in PowerShell: wsl)
2) Update basics (recommended)
In Ubuntu:
sudo apt update
sudo apt install -y curl git
3) Install OpenClaw in WSL
In Ubuntu:
curl -fsSL https://openclaw.ai/install.sh | bash
openclaw onboard --install-daemon
4) Verify + open UI
Still in Ubuntu:
openclaw gateway status
openclaw dashboard
If openclaw dashboard doesn’t auto-open a browser, manually open:
http://127.0.0.1:18789/
If anything errors, paste the output of:
openclaw --version
openclaw gateway status
PS C:\WINDOWS\system32> wsl
Windows Subsystem for Linux has no installed distributions.
You can resolve this by installing a distribution with the instructions below:
Use 'wsl.exe --list --online' to list available distributions
and 'wsl.exe --install <Distro>' to install.
That message means WSL is enabled, but Ubuntu (the Linux distro) is not installed yet.
Do this in PowerShell (Run as Administrator):
- List available distros:
wsl.exe --list --online
- Install Ubuntu (pick one that exists in the list; try 24.04 first):
wsl.exe --install -d Ubuntu-24.04
If Ubuntu-24.04 isn’t available, use:
wsl.exe --install -d Ubuntu
# or: wsl.exe --install -d Ubuntu-22.04
- Launch it:
wsl.exe -d Ubuntu-24.04
The first launch will ask you to create a Linux username/password. After that, we’ll install OpenClaw inside Ubuntu.
If step (2) errors, paste the output of:
wsl.exe --version
wsl.exe --status
PS C:\WINDOWS\system32> wsl.exe -d Ubuntu-24.04
Provisioning the new WSL instance Ubuntu-24.04
This might take a while...
Create a default Unix user account: foidl
New password:
Retype new password:
passwd: password updated successfully
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
foidl@DESKTOP-TRAA38N:/mnt/c/WINDOWS/system32$
foidl@DESKTOP-TRAA38N:/mnt/c/WINDOWS/system32$, what do i do from here
You’re in Ubuntu now (WSL). From here, run these in that Linux prompt:
1) Go to your Linux home folder
cd ~
2) Update + install a couple basics
sudo apt update
sudo apt install -y curl git
3) Install OpenClaw
curl -fsSL https://openclaw.ai/install.sh | bash
4) Run onboarding + install the daemon
openclaw onboard --install-daemon
5) Check it’s running + open the UI
openclaw gateway status
openclaw dashboard
If openclaw isn’t found right after install, close/reopen the Ubuntu window, or run:
source ~/.bashrc
Paste whatever openclaw gateway status prints if you hit any errors.
it wont let me copy and paste
That’s a WSL/terminal UI thing, not an OpenClaw thing.
If you’re in Windows Terminal
- Paste:
Ctrl+Shift+V(or right‑click) - Copy: select text with mouse →
Ctrl+Shift+C
If you’re in the old console host (black window)
- Paste: right‑click (or
Shift+Insert) - If that doesn’t work: click the window icon (top-left) → Properties → enable Use Ctrl+Shift+C/V as Copy/Paste and QuickEdit Mode, then reopen WSL.
Easiest workaround (no paste needed)
Just type these one by one (they’re short):
cd ~
sudo apt update
sudo apt install -y curl git
When those finish, tell me and I’ll give you the next command(s).
ok i instled open claw on the subsystem, but its at the end it gvae me like my dashboard url and my token an it says no gui detected and to open if from my computer what do i do now?>
Perfect — that “no GUI detected” message is normal in WSL (Linux can’t auto-open a Windows browser).
Do this:
- In the WSL/Ubuntu terminal, make sure the gateway is running:
openclaw gateway status
- On your Windows side, open a browser (Chrome/Edge) and go to:
- http://127.0.0.1:18789/
(or the exact dashboard URL it printed)
- In the dashboard, if it asks for auth:
- open the settings / Gateway Access area
- paste the token the wizard printed
- click Connect
Notes:
- Don’t paste that token into Discord (treat it like a password).
- If
http://127.0.0.1:18789/doesn’t load, tell me whatopenclaw gateway statussays and I’ll walk you through checking the WSL IP / port forwarding.
Once the dashboard loads, you can chat right there and continue setup (models, memory, channels, etc.).
what do you mean dashboard?, when i go to the links that it printed out it just says sites cant be reached
“Dashboard” = the web Control UI that the OpenClaw Gateway serves on a local port (usually 18789). If the browser says “site can’t be reached”, either the Gateway isn’t running/listening, or Windows can’t reach the WSL port.
Do these checks inside Ubuntu (WSL) first:
- Is the Gateway running?
openclaw gateway status
- If it says
Runtime: stopped(or anything not running), start it:
openclaw gateway restart
- Can Ubuntu itself reach the dashboard?
curl -I http://127.0.0.1:18789/ | head
- If this fails too → the Gateway isn’t listening on that port (maybe a different port, or it crashed). Paste your
openclaw gateway statusoutput and we’ll fix that.
If (1) shows running and (2) works, but Windows still can’t open the URL:
- Update WSL (this often fixes localhost forwarding):
In PowerShell (Admin):
wsl --update
Then reboot Windows and try http://127.0.0.1:18789/ again.
If it still can’t be reached after that, paste:
- the output of
openclaw gateway status(from Ubuntu)
- and tell me what the browser error is exactly (e.g.
ERR_CONNECTION_REFUSEDvs timeout).
foidl@DESKTOP-TRAA38N:~$ openclaw gateway status
node:internal/modules/cjs/loader:1386
throw err;
^
Error: Cannot find module '/mnt/c/nvm4w/nodejs/node_modules/openclaw/openclaw.mjs'
at Function._resolveFilename (node:internal/modules/cjs/loader:1383:15)
at defaultResolveImpl (node:internal/modules/cjs/loader:1025:19)
at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1030:22)
at Function._load (node:internal/modules/cjs/loader:1192:37)
at TracingChannel.traceSync (node:diagnostics_channel:328:14)
at wrapModuleLoad (node:internal/modules/cjs/loader:237:24)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:171:5)
at node:internal/main/run_main_module:36:49 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Node.js v22.22.0
foidl@DESKTOP-TRAA38N:~$
That error path is the giveaway:
/mnt/c/nvm4w/nodejs/...openclaw.mjs
You’re still running the Windows openclaw from inside WSL, and that Windows install is broken. We need WSL to use a Linux Node + Linux OpenClaw, not anything under /mnt/c/....
1) In Ubuntu (WSL): confirm what it’s using
Run:
which -a openclaw
which -a node
echo $PATH | tr ':' '\n' | head -30
If you see /mnt/c/nvm4w/... in the results, keep going.
2) Stop WSL from injecting Windows PATH (recommended)
In Ubuntu (WSL):
sudo tee /etc/wsl.conf >/dev/null <<'EOF'
[boot]
systemd=true
[interop]
appendWindowsPath=false
EOF
Then in Windows PowerShell:
wsl --shutdown
Re-open Ubuntu.
3) Install Node 22 inside Ubuntu
In Ubuntu:
sudo apt update
sudo apt install -y curl git build-essential ca-certificates
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
source ~/.bashrc
nvm install 22
node -v
npm -v
4) Install OpenClaw in Ubuntu
Start with the reliable install (avoids the node-llama-cpp peer-dep drama while you get set up):
npm install -g openclaw@latest --legacy-peer-deps
openclaw --version
Now openclaw gateway status should work:
openclaw gateway restart
openclaw gateway status
5) Open the dashboard from Windows
On Windows, open:
If it asks for a token, paste the token you got during onboarding.
If anything in steps 2–4 errors, paste the output of:
which openclaw
openclaw --version
- foidl@DESKTOP-TRAA38N:~$ which -a openclaw
which -a node
echo $PATH | tr ':' '\n' | head -30
/mnt/c/nvm4w/nodejs/openclaw
/mnt/c/nvm4w/nodejs/openclaw
/usr/bin/node
/bin/node
/usr/local/sbin
/usr/local/bin
/usr/sbin
/usr/bin
/sbin
/bin
/usr/games
/usr/local/games
/usr/lib/wsl/lib
/mnt/c/WINDOWS/system32
/mnt/c/WINDOWS
/mnt/c/WINDOWS/System32/Wbem
/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/
/mnt/c/WINDOWS/System32/OpenSSH/
/mnt/c/Program Files/Git/cmd
/mnt/c/Program Files/Sunshine
/mnt/c/Program Files/Sunshine/tools
/mnt/c/Users/foidl/AppData/Local/nvm
/mnt/c/nvm4w/nodejs
/mnt/c/Users/foidl/AppData/Local/Microsoft/WindowsApps
/mnt/c/Users/foidl/AppData/Roaming/npm
/mnt/c/Users/foidl/AppData/Local/nvm
/mnt/c/nvm4w/nodejs
/snap/bin
foidl@DESKTOP-TRAA38N:~$
Yep — your PATH is still pulling in the Windows openclaw (/mnt/c/nvm4w/nodejs/openclaw). That’s why it keeps trying to load C:\\nvm4w\\...openclaw.mjs and blowing up.
Fix: stop WSL from inheriting the Windows PATH, then install OpenClaw inside Ubuntu
1) In Ubuntu (WSL), run:
sudo tee /etc/wsl.conf >/dev/null <<'EOF'
[boot]
systemd=true
[interop]
appendWindowsPath=false
EOF
2) Back in PowerShell (Windows), run:
wsl --shutdown
3) Re-open Ubuntu, then confirm the Windows paths are gone:
echo $PATH | tr ':' '\n' | head -30
which -a openclaw
At this point which -a openclaw should ideally show nothing (or “not found”). That’s good.
4) Install OpenClaw in Ubuntu (WSL):
npm install -g openclaw@latest --legacy-peer-deps
hash -r
which openclaw
openclaw --version
5) Now run onboarding / start the gateway:
openclaw onboard --install-daemon
openclaw gateway status
Then open on Windows:
http://127.0.0.1:18789/
If you paste the output of which openclaw after step 4, I can confirm you’re on the WSL-native install (that’s the whole key).
sudo tee /etc/wsl.conf >/dev/null <<'EOF'
[boot]
systemd=true
[interop]
appendWindowsPath=false
EOF
sudo: command not found
That means you’re not able to elevate in that Ubuntu install (weird, but fixable). We can still do it by launching WSL as root from Windows.
1) Exit Ubuntu back to PowerShell
In the Ubuntu prompt, run:
exit
2) Open Ubuntu as root (PowerShell)
In PowerShell run:
wsl -d Ubuntu-24.04 -u root
Now your prompt should change to something like root@....
3) Write /etc/wsl.conf (as root)
Paste this in that root shell:
cat > /etc/wsl.conf <<'EOF'
[boot]
systemd=true
[interop]
appendWindowsPath=false
EOF
(Optional but recommended) install sudo for later:
apt update
apt install -y sudo
usermod -aG sudo foidl
Then exit:
exit
4) Restart WSL (PowerShell)
wsl --shutdown
wsl -d Ubuntu-24.04
5) Confirm Windows PATH is gone inside Ubuntu
In Ubuntu:
which -a openclaw
echo $PATH | tr ':' '\n' | head -20
node -v
After this, which -a openclaw should not show /mnt/c/nvm4w/....
Then we can install the Linux OpenClaw inside WSL cleanly.
sudo tee /etc/wsl.conf >/dev/null <<'EOF'
[boot]
systemd=true
[interop]
appendWindowsPath=false
EOF
sudo: command not found
foidl@DESKTOP-TRAA38N:~$ exit
logout
PS C:\WINDOWS\system32> wsl -d Ubuntu-24.04 -u root
root@DESKTOP-TRAA38N:/mnt/c/WINDOWS/system32# cat > /etc/wsl.conf <<'EOF'
[boot]
systemd=true
[interop]
appendWindowsPath=false
EOF
root@DESKTOP-TRAA38N:/mnt/c/WINDOWS/system32# apt update
apt install -y sudo
Hit:1 https://deb.nodesource.com/node_22.x nodistro InRelease
Hit:2 http://archive.ubuntu.com/ubuntu noble InRelease
Hit:3 http://security.ubuntu.com/ubuntu noble-security InRelease
Hit:4 http://archive.ubuntu.com/ubuntu noble-updates InRelease
Hit:5 http://archive.ubuntu.com/ubuntu noble-backports InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
6 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
sudo is already the newest version (1.9.15p5-3ubuntu5.24.04.1).
sudo set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
root@DESKTOP-TRAA38N:/mnt/c/WINDOWS/system32# usermod -aG sudo foidl
root@DESKTOP-TRAA38N:/mnt/c/WINDOWS/system32# wsl --shutdown
wsl -d Ubuntu-24.04
Command 'wsl' not found, but can be installed with:
apt install wsl
Command 'wsl' not found, but can be installed with:
apt install wsl
root@DESKTOP-TRAA38N:/mnt/c/WINDOWS/system32#
@glacial hollow hello?
You’re there — the issue is just that this Ubuntu install doesn’t have sudo installed yet, so sudo ... will always be “command not found”.
Do this from Windows PowerShell:
- Open Ubuntu as root:
wsl -d Ubuntu-24.04 -u root
- Install sudo + add your user to sudo group:
apt update
apt install -y sudo
usermod -aG sudo foidl
- Now write the WSL config (still as root):
cat > /etc/wsl.conf <<'EOF'
[boot]
systemd=true
[interop]
appendWindowsPath=false
EOF
exit
- Restart WSL (back in PowerShell):
wsl --shutdown
wsl -d Ubuntu-24.04
- In Ubuntu, verify Windows
openclawis gone:
which -a openclaw
Send me what which -a openclaw prints after the restart and we’ll do the clean Linux install next.
read all of it because it also said that wsl is like not found and stuff @glacial hollow
You’re hitting a context mix-up between Windows PowerShell and the Ubuntu (WSL) shell.
Quick rule
- If your prompt looks like
PS C:\...>→ you’re in Windows PowerShell (Windows commands likewslwork here) - If your prompt looks like
foidl@DESKTOP:~$→ you’re in Ubuntu/WSL (Linux commands likesudowork here)
So:
wsl: command not foundhappens when you try to runwslinside Ubuntu (normal)sudo: command not foundhappens because Ubuntu doesn’t havesudoinstalled yet (also fixable)
1) First: are you in the right place for wsl?
If you currently see foidl@...$, run:
exit
That brings you back to PowerShell.
Now in PowerShell, run and paste the output:
wsl --status
wsl -l -v
2) Fix the sudo missing thing (needs root inside WSL)
In PowerShell run:
wsl -d Ubuntu-24.04 -u root
Now you’re root in Ubuntu. Run:
apt update
apt install -y sudo
usermod -aG sudo foidl
Then write the config to stop inheriting Windows PATH (so it stops picking up your broken Windows openclaw):
cat > /etc/wsl.conf <<'EOF'
[boot]
systemd=true
[interop]
appendWindowsPath=false
EOF
exit
Back in PowerShell:
wsl --shutdown
wsl -d Ubuntu-24.04
Now in Ubuntu, paste:
which -a openclaw
If that no longer shows /mnt/c/nvm4w/..., you’re good and we can reinstall OpenClaw cleanly inside WSL.
If you paste what wsl --status / wsl -l -v says, I’ll tell you the exact next step based on your state.
root@DESKTOP-TRAA38N:/mnt/c/WINDOWS/system32# usermod -aG sudo foidl
root@DESKTOP-TRAA38N:/mnt/c/WINDOWS/system32# wsl --shutdown
wsl -d Ubuntu-24.04
Command 'wsl' not found, but can be installed with:
apt install wsl
Command 'wsl' not found, but can be installed with:
apt install wsl
root@DESKTOP-TRAA38N:/mnt/c/WINDOWS/system32# wsl --status
wsl -l -v
Command 'wsl' not found, but can be installed with:
apt install wsl
Command 'wsl' not found, but can be installed with:
apt install wsl
root@DESKTOP-TRAA38N:/mnt/c/WINDOWS/system32#
You’re still inside Ubuntu (WSL) as root. That’s why wsl says “Command not found” — wsl is a Windows PowerShell command, not a Linux command.
Step 1: From where you are now (the root@...# prompt), do the WSL config
Run this in the Linux/root prompt:
cat > /etc/wsl.conf <<'EOF'
[boot]
systemd=true
[interop]
appendWindowsPath=false
EOF
Step 2: Exit back to Windows PowerShell
Now run:
exit
If it still shows a foidl@...$ or root@...# prompt, run exit again (or just close the Ubuntu/WSL window).
You are done only when you see:
PS C:\...>
Step 3: Restart WSL (this part must be in PowerShell)
In PowerShell:
wsl --shutdown
wsl -d Ubuntu-24.04
Step 4: Check the PATH is fixed (in Ubuntu)
Back in Ubuntu (should be foidl@...$ now), run:
which -a openclaw
It should NOT show /mnt/c/nvm4w/nodejs/openclaw anymore.
Paste what which -a openclaw prints and I’ll tell you the next exact install command (we may need to reinstall OpenClaw inside Ubuntu after PATH is clean).
there was no output in step 1
That’s expected — cat > /etc/wsl.conf ... doesn’t print anything when it succeeds.
Now the important part is: you must restart WSL from Windows PowerShell, not from inside Ubuntu.
Do this next
- In the Linux/root prompt, run:
exit
Keep running exit until you’re back at:
PS C:\...>
- In PowerShell, restart WSL:
wsl --shutdown
wsl -d Ubuntu-24.04
- In Ubuntu, verify the Windows PATH is gone:
which -a openclaw
echo $PATH | tr ':' '\n' | head -20
Paste the output of which -a openclaw. That tells us if we successfully stopped WSL from using the broken Windows openclaw.
foidl@DESKTOP-TRAA38N:/mnt/c/WINDOWS/system32$ which -a openclaw
echo $PATH | tr ':' '\n' | head -20
/home/foidl/.npm-global/bin/openclaw
/home/foidl/.npm-global/bin
/usr/local/sbin
/usr/local/bin
/usr/sbin
/usr/bin
/sbin
/bin
/usr/games
/usr/local/games
/usr/lib/wsl/lib
/snap/bin
foidl@DESKTOP-TRAA38N:/mnt/c/WINDOWS/system32$
Perfect — this is exactly what we wanted.
openclawis now the Linux one:/home/foidl/.npm-global/bin/openclaw- Your PATH no longer includes
/mnt/c/...Windows stuff, so it won’t pick up the broken Windows install anymore.
Now do this in Ubuntu (WSL):
1) Confirm OpenClaw runs
openclaw --version
2) Start/restart the gateway
openclaw gateway restart
openclaw gateway status
3) Open the dashboard from Windows
On your Windows browser, open:
http://127.0.0.1:18789/
If it asks for a token, use:
openclaw config get gateway.auth.token
(copy that token into the dashboard “Gateway Access” / token field, then Connect)
If openclaw gateway status shows it’s running but the browser still can’t reach it, tell me what openclaw gateway status prints and we’ll check what address/port it’s bound to.
foidl@DESKTOP-TRAA38N:/mnt/c/WINDOWS/system32$ openclaw gateway restart
openclaw gateway status
🦞 OpenClaw 2026.2.19-2 (45d9b20) — Type the command with confidence—nature will provide the stack trace if needed.
Restarted systemd service: openclaw-gateway.service
🦞 OpenClaw 2026.2.19-2 (45d9b20) — Your inbox, your infra, your rules.
│
â—‡
Service: systemd (enabled)
File logs: /tmp/openclaw/openclaw-2026-02-21.log
Command: /usr/bin/node /home/foidl/.npm-global/lib/node_modules/openclaw/dist/index.js gateway --port 18789
Service file: ~/.config/systemd/user/openclaw-gateway.service
Service env: OPENCLAW_GATEWAY_PORT=18789
Config (cli): ~/.openclaw/openclaw.json
Config (service): ~/.openclaw/openclaw.json
Gateway: bind=loopback (127.0.0.1), port=18789 (service args)
Probe target: ws://127.0.0.1:18789
Dashboard: http://127.0.0.1:18789/
Probe note: Loopback-only gateway; only local clients can connect.
Runtime: running (pid 4235, state active, sub running, last exit 0, reason 0)
Warm-up: launch agents can take a few seconds. Try again shortly.
RPC probe: failed
RPC target: ws://127.0.0.1:18789
gateway closed (1006 abnormal closure (no close frame)): no close reason
Gateway target: ws://127.0.0.1:18789
Source: cli --url
Config: /home/foidl/.openclaw/openclaw.json
Gateway port 18789 is not listening (service appears running).
Logs: journalctl --user -u openclaw-gateway.service -n 200 --no-pager
Troubles: run openclaw status
Troubleshooting: https://docs.openclaw.ai/troubles
@glacial hollow
@glacial hollow hello?
I’m here — you’re unblocked now (that which -a openclaw output was the big milestone).
Next steps, right now in Ubuntu (WSL):
- Run and paste the output:
openclaw gateway status
- Also run:
openclaw gateway restart
openclaw gateway status
While that’s running, on Windows open:
http://127.0.0.1:18789/
If the webpage still can’t be reached, paste the openclaw gateway status output and I’ll tell you exactly what URL/port it’s actually listening on (sometimes it’s not 18789, or it failed to bind).
You’ve got the service running, but the Gateway process is not actually listening on 18789 (so the dashboard URL won’t work yet). Next step is: check the service logs to see why it isn’t binding.
Run these inside Ubuntu (WSL) and paste the output here:
# 1) Does anything listen on 18789?
ss -lntp | grep 18789 || true
# 2) What does systemd think is happening?
systemctl --user status openclaw-gateway.service --no-pager
# 3) The actual error logs (this is the key one)
journalctl --user -u openclaw-gateway.service -n 200 --no-pager
Optional but helpful (also in WSL):
curl -v http://127.0.0.1:18789/ 2>&1 | head -40
Once we see the journal output, we’ll know if it’s crashing on startup (config error, missing dependency, permissions, etc.) and get the dashboard reachable.
foidl@DESKTOP-TRAA38N:/mnt/c/WINDOWS/system32$ openclaw gateway status
🦞 OpenClaw 2026.2.19-2 (45d9b20) — Your task has been queued; your dignity has been deprecated.
│
â—‡
Service: systemd (enabled)
File logs: /tmp/openclaw/openclaw-2026-02-21.log
Command: /usr/bin/node /home/foidl/.npm-global/lib/node_modules/openclaw/dist/index.js gateway --port 18789
Service file: ~/.config/systemd/user/openclaw-gateway.service
Service env: OPENCLAW_GATEWAY_PORT=18789
Config (cli): ~/.openclaw/openclaw.json
Config (service): ~/.openclaw/openclaw.json
Gateway: bind=loopback (127.0.0.1), port=18789 (service args)
Probe target: ws://127.0.0.1:18789
Dashboard: http://127.0.0.1:18789/
Probe note: Loopback-only gateway; only local clients can connect.
Runtime: running (pid 4875, state active, sub running, last exit 0, reason 0)
Warm-up: launch agents can take a few seconds. Try again shortly.
RPC probe: failed
RPC target: ws://127.0.0.1:18789
gateway closed (1006 abnormal closure (no close frame)): no close reason
Gateway target: ws://127.0.0.1:18789
Source: cli --url
Config: /home/foidl/.openclaw/openclaw.json
Gateway port 18789 is not listening (service appears running).
Logs: journalctl --user -u openclaw-gateway.service -n 200 --no-pager
Troubles: run openclaw status
Yep — that output is telling us exactly what to do next: we need the systemd journal logs, because the service is “active” but the port isn’t actually bound.
Please run these in Ubuntu (WSL) and paste the output (they’re safe to share; they shouldn’t include your token):
# 1) check if anything is listening
ss -lntp | grep 18789 || true
# 2) service status
systemctl --user status openclaw-gateway.service --no-pager
# 3) last 200 log lines (MOST IMPORTANT)
journalctl --user -u openclaw-gateway.service -n 200 --no-pager
If ss is “command not found”, install it:
sudo apt update && sudo apt install -y iproute2
Once you paste the journalctl output, I can tell you the exact fix (it’s usually a crash on startup due to config, permissions, or a missing dependency).
That HyperNotepad link is the npm install / node-llama-cpp failure from your Windows install earlier — I can read it, but it’s not the log we need for the current problem.
Right now your issue is:
Gateway port 18789 is not listening (service appears running).
To fix that, we need the WSL systemd service logs (journal), not the npm install log.
Run these inside Ubuntu (WSL) and paste the output (you can paste here or put it in HyperNotepad):
cd ~
ss -lntp | grep 18789 || true
systemctl --user status openclaw-gateway.service --no-pager
journalctl --user -u openclaw-gateway.service -n 200 --no-pager
If ss says “command not found”, run:
sudo apt update && sudo apt install -y iproute2
Once you paste the journalctl output, I’ll tell you exactly why the gateway isn’t binding (and what to change).
no the thing inside of the hypernotepad is the outputs of all the things you told me to run
I can read that HyperNotepad link — but it still contains the old Windows npm/node-llama-cpp failure log, not the new WSL ss / systemctl / journalctl output we need for this issue.
Right now the problem is:
- systemd service says running
- but port 18789 isn’t actually listening
- so the browser dashboard can’t load
Please run these inside Ubuntu (WSL) and paste the output (here or in a NEW HyperNotepad note)
# 1) show if anything is listening on the port
ss -lntp | grep 18789 || true
# 2) service status
systemctl --user status openclaw-gateway.service --no-pager
# 3) service logs (this is the key)
journalctl --user -u openclaw-gateway.service -n 200 --no-pager
# 4) also tail the file log it mentioned
tail -n 200 /tmp/openclaw/openclaw-2026-02-21.log
If ss is missing:
sudo apt update && sudo apt install -y iproute2
Fast workaround (often reveals the real error immediately)
Run the gateway in the foreground (so it prints the crash reason):
systemctl --user stop openclaw-gateway.service
openclaw gateway --port 18789 --verbose
Then paste whatever error it prints.
Once I have either the journalctl output or the foreground error, I can tell you exactly why it isn’t binding (port conflict, config error, missing dependency, etc.) and get the dashboard reachable.
Got it — this log finally shows the real reason:
Gateway start blocked: set gateway.mode=local (current: unset) or pass --allow-unconfigured.
So the service keeps starting and immediately exiting, which is why nothing is listening on 18789 and the dashboard URL won’t load.
Do this inside Ubuntu (WSL):
- Go to your Linux home (just to avoid
/mnt/c/...confusion):
cd ~
- Set the gateway mode to local:
openclaw config set gateway.mode local
openclaw config get gateway.mode
- Restart the gateway service:
openclaw gateway restart
openclaw gateway status
After that, openclaw gateway status should say the port is listening and RPC probe: ok.
Then on Windows, open:
If it asks for a token, get it from WSL with:
openclaw config get gateway.auth.token
If openclaw config set ... errors for any reason, paste that error and we’ll do it by editing ~/.openclaw/openclaw.json directly.
ok so it took me to the gate way dashboard and my token worked, is it completely installed and ready now?
If the dashboard loads and your token connects successfully, you’re basically up.
Two quick checks to be 100% sure (run in WSL/Ubuntu):
openclaw gateway status
openclaw status
What you want to see:
Gateway port 18789 is listeningRPC probe: ok
If those look good: yes, you’re installed and ready. Next step is just configuring a model/provider (so it can reply) and any channels you want.
If this fixed it, please right‑click the solution message → Apps → ✅ Mark Solution so Answer Overflow can index it.
ok so am i able to close my powershell?
Yes — as long as you installed the gateway as a service, you can close PowerShell/Ubuntu and it’ll keep running in the background.
Quick confirm in WSL/Ubuntu first:
openclaw gateway status
If it says Service: systemd (enabled) and Runtime: running, you’re good to close the terminal.
If you ever need to manage it later (in WSL):
openclaw gateway statusopenclaw gateway restartopenclaw logs --follow
Service: systemd (enabled)
File logs: /tmp/openclaw/openclaw-2026-02-21.log
Command: /usr/bin/node /home/foidl/.npm-global/lib/node_modules/openclaw/dist/index.js gateway --port 18789
Service file: ~/.config/systemd/user/openclaw-gateway.service
Service env: OPENCLAW_GATEWAY_PORT=18789
Config (cli): ~/.openclaw/openclaw.json
Config (service): ~/.openclaw/openclaw.json
Gateway: bind=loopback (127.0.0.1), port=18789 (service args)
Probe target: ws://127.0.0.1:18789
Dashboard: http://127.0.0.1:18789/
Probe note: Loopback-only gateway; only local clients can connect.
Runtime: running (pid 6318, state active, sub running, last exit 0, reason 0)
RPC probe: ok
Listening: 127.0.0.1:18789
Troubles: run openclaw status
Troubleshooting: https://docs.openclaw.ai/troubleshooting
foidl@DESKTOP-TRAA38N:~$