#i get npm error code enoent when trying to install on powershell
1 messages · Page 1 of 1 (latest)
Looks like that . might’ve been accidental — but if you’re hitting npm ERR! code ENOENT in PowerShell, can you paste:
- The exact command you ran
- The full ENOENT line (it usually includes the missing path)
node -vandnpm -v- The last ~30 lines from the npm log file it mentions (usually under
C:\Users\<you>\AppData\Local\npm-cache\_logs\...)
A couple common causes on Windows (and quick checks):
- Wrong package manager for OpenClaw repo: if you cloned the repo, don’t use
npm install— use pnpm:corepack enable corepack prepare pnpm@latest --activate pnpm install - Path length issues (can surface as ENOENT): enable long paths + use a short folder like
C:\dev\openclaw(not OneDrive/Desktop).
- Something missing from PATH: run
and paste the output.where node where npm
Drop the error snippet and I’ll tell you which of these it is.
i ran iwr -useb https://openclaw.ai/install.ps1 | iex
That command is the right installer — under the hood it basically ends up doing:
npm install -g openclaw@latest
On Windows, npm ERR! code ENOENT during that step is most often “git is missing” (the error line usually looks like spawn git ENOENT or ENOENT ... git).
Quick checks in PowerShell:
node -v
npm -v
git --version
where git
- If
gitisn’t found → install Git for Windows (and make sure it adds itself to PATH), then close/reopen PowerShell and rerun the installer: https://git-scm.com/download/win
If it’s not the git one, paste the exact ENOENT line (it includes the missing path) and I’ll tell you the fix.
Tiny thing first: the command should be exactly (no trailing #):
iwr -useb https://openclaw.ai/install.ps1 | iex
If you run | iex# PowerShell may treat that as the command name iex# (not iex), which can break the whole thing.
If it still fails, 90% of the time this Windows ENOENT is actually missing git during npm install -g openclaw@latest.
Can you paste the output of these two?
git --version
where git
To get more verbose installer output (from the docs):
Set-PSDebug -Trace 1
& ([scriptblock]::Create((iwr -useb https://openclaw.ai/install.ps1))) -NoOnboard
Set-PSDebug -Trace 0
Docs reference: https://docs.openclaw.ai/help/faq#windows-install-says-git-not-found-or-openclaw-not-recognized