#error code 1

1 messages · Page 1 of 1 (latest)

orchid merlin
#

I run the code on the open claw website and it shows up with this ive got git and everything

node.exe : npm error code 1
At line:1 char:1

  • & "C:\Program Files\nodejs/node.exe" "C:\Program Files\nodejs/node_mo ...
  •   + CategoryInfo          : NotSpecified: (npm error code 1:String) [], RemoteException
      + FullyQualifiedErrorId : NativeCommandError
soft cryptBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> âś… Mark Solution

dry tinselBOT
#

npm error code 1 is just the generic “something failed” exit code — the useful part is the lines above it (usually npm ERR! ...) or the npm debug log.

Can you paste these 3 things?

  1. What command did you run exactly (one of these, or something else)?
  • iwr -useb https://openclaw.ai/install.ps1 | iex
  • npm install -g openclaw@latest
  • “from source” (git clone ..., pnpm install, etc.)
  1. Versions:
node -v
npm -v
git --version
  1. The npm debug log tail (this usually contains the real error):
#
$log = Get-ChildItem "$env:LOCALAPPDATA\npm-cache\_logs" | Sort-Object LastWriteTime -Descending | Select-Object -First 1
$log.FullName
Get-Content $log.FullName -Tail 80

Most common cause on Windows: Node is too old (OpenClaw needs Node 22+). Also, if you’re staying on Windows-native, note the docs recommend WSL2 for fewer dependency/build issues: https://docs.openclaw.ai/install and https://docs.openclaw.ai/start/getting-started.

orchid merlin
#

i ran PS C:\WINDOWS\system32> iwr -useb https://openclaw.ai/install.ps1 | iex and versions are PS C:\WINDOWS\system32> node -v
v24.14.0
PS C:\WINDOWS\system32> npm -v
11.9.0
PS C:\WINDOWS\system32> git --version
git version 2.53.0.windows.1

dry tinselBOT
#

Your Node/npm/git versions look fine (Node 24 is new, but it should still pass the “Node 22+” requirement). The problem is we still don’t have the real error — npm error code 1 is just the exit status.

Can you grab one of these, and paste it here?

A) Paste the npm debug log (best signal)

Run this in PowerShell right after it fails:

$log = Get-ChildItem "$env:LOCALAPPDATA\npm-cache\_logs" | Sort-Object LastWriteTime -Descending | Select-Object -First 1
$log.FullName
Get-Content $log.FullName -Tail 120

B) Or run the install manually with verbose output

(This bypasses the installer script’s reduced logging)

npm install -g openclaw@latest --loglevel verbose
#

Then paste the last ~50 lines of output (starting from the first npm ERR!).

Also quick check (permission/path)

npm config get prefix

If that prints something under C:\Program Files\..., global installs often fail unless you’re admin (and the fix is to change npm’s global prefix to a user-writable folder).

Once you paste the debug tail, I can tell you exactly what dependency/step is failing.

#

You’re accidentally pasting the PowerShell prompt text (PS C:\WINDOWS\system32>) into PowerShell as if it were a command.

In PowerShell, ps is an alias for Get-Process, so when you run:

PS C:\WINDOWS\system32> node -v

PowerShell thinks you’re calling Get-Process with a bunch of extra arguments, which is why you get:
Get-Process : A positional parameter cannot be found...

Run only the part after the >, like this (copy/paste these lines exactly):

node -v
npm -v
git --version
npm config get prefix
#

Then, for the real install failure reason, paste the npm debug log tail:

$log = Get-ChildItem "$env:LOCALAPPDATA\npm-cache\_logs" | Sort-Object LastWriteTime -Descending | Select-Object -First 1
$log.FullName
Get-Content $log.FullName -Tail 120

Post the output of those (especially the log tail) and we can pinpoint why npm install -g openclaw is exiting with code 1.

orchid merlin
#

Sorry i don’t understand

dry tinselBOT
#

No worries — PowerShell is confusing the first time.

The key idea

When you open PowerShell, it shows a prompt like:

PS C:\WINDOWS\system32>

You do NOT type that part.
You type after it.

Example: if you see
PS C:\WINDOWS\system32>

you type:
node -v
and press Enter.

#

What I need from you (easiest way)

Let’s skip the fancy commands and just grab the npm log file.

  1. Try the install again (so it creates a fresh log):
iwr -useb https://openclaw.ai/install.ps1 | iex
  1. Open File Explorer and paste this into the address bar:
%LOCALAPPDATA%\npm-cache\_logs
  1. Open the newest file ending in -debug-0.log (it should have the newest time).

  2. Copy/paste the last ~60 lines of that file here (or attach the whole file).

#

That log will contain the exact reason for “npm error code 1”, and then I can tell you the fix.

orchid merlin
#

No it’s you your not so clear with what to do

dry tinselBOT
#

Fair point — let’s make this idiot-proof and do it with clicks only (no extra commands).

What to do (Windows)

  1. Run the installer again (in PowerShell):
iwr -useb https://openclaw.ai/install.ps1 | iex

Let it fail.

  1. Press Windows key + R (opens “Run”).

  2. Paste this and hit Enter:

%LOCALAPPDATA%\npm-cache\_logs
  1. In that folder, find the newest file that ends with:
#

-debug-0.log

  1. Drag that file into this Discord thread as an attachment (or open it and copy the last ~100 lines).

That log contains the actual reason behind npm error code 1 (permissions, missing build tools, network/cert, etc.). Once you post it, I’ll tell you the exact fix.

orchid merlin
#

i cant its too many letters and cant drag file

dry tinselBOT
#

All good — you don’t need to send the whole log.

Option 1 (easiest): copy just the last lines

  1. Open the newest *-debug-0.log file (double click it, it opens in Notepad)
  2. Press Ctrl + End (jumps to the bottom)
  3. Highlight the last ~20–40 lines, copy, and paste them here (that’s enough)

Option 2: screenshot

Scroll to the bottom of the log and post a screenshot of the last page.

Option 3 (if copying the log is annoying): paste the npm error lines only

Run the installer again and when it fails, copy/paste only the lines that start with:
npm ERR!

That’s usually short and contains the real cause (permissions, network, etc.).

orchid merlin
#

4498 http cache any-promise@https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz 0ms (cache hit)
4499 http cache axios@https://registry.npmjs.org/axios/-/axios-1.13.6.tgz 0ms (cache hit)
4500 http cache agent-base@https://registry.npmjs.org/agent-base/-/agent-base-8.0.0.tgz 0ms (cache hit)
4501 http cache ajv@https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz 0ms (cache hit)
4502 http cache ansi-styles@https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz 0ms (cache hit)
4503 http cache atomic-sleep@https://registry.npmjs.org/atomic-sleep/-/atomic-sleep-1.0.0.tgz 0ms (cache hit)
4504 http cache ansi-escapes@https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.2.1.tgz 0ms (cache hit)
4505 http cache abort-controller@https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz 0ms (cache hit)
4506 http cache accepts@https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz 0ms (cache hit)
4507 http cache argparse@https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz 0ms (cache hit)
4508 http cache data-uri-to-buffer@https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.2.tgz 0ms (cache hit)
4509 http cache ansi-regex@https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz 0ms (cache hit)
4510 http cache ansi-regex@https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz 0ms (cache hit)
4511 http cache ajv-formats@https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz 0ms (cache hit)
4512 http fetch GET 200 https://codeload.github.com/whiskeysockets/libsignal-node/tar.gz/1c30d7d7e76a3b0aa120b04dc6a26f5a12dccf67 1850ms (cache revalidated)
4513 silly packumentCache heap:2348810240 maxSize:587202560 maxEntrySize:293601280
4514 warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
4515 warn deprecated glob@10.5.0: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version.

dry tinselBOT
#

That snippet is still the “downloading packages” part — it doesn’t include the failure yet. The actual reason will be near the very bottom of the log and will usually contain lines like npm ERR! or gyp ERR!.

Get the exact error (short, not “too many letters”)

Open the log in Notepad, then:

  1. Press Ctrl + F
  2. Search for: npm ERR!
  3. Copy/paste from the first npm ERR! line to the end (it’s usually only ~10–30 lines)

If npm ERR! doesn’t exist, search for: gyp ERR!

Likely cause (based on the log you showed)

Your log shows npm fetching whiskeysockets/libsignal-node — on Windows, that often fails to install on newer Node versions because it needs a native build / prebuilt binary.

Two quick fixes that usually work:

Fix A (recommended): use Node 22 LTS

#
  • Uninstall Node 24
  • Install Node 22 LTS from nodejs.org
  • Re-open PowerShell and re-run the installer

Fix B (most reliable on Windows): use WSL2
The docs explicitly recommend WSL2 for Windows installs: https://docs.openclaw.ai/install

If you paste the npm ERR! / gyp ERR! block, I can tell you which fix is definitely the right one (and exactly what to install if it’s missing build tools).

orchid merlin
#

neither exist

dry tinselBOT
#

That’s expected — the debug log file usually doesn’t contain the literal text npm ERR! / gyp ERR! (those are the console lines). My bad on that search tip.

Do this instead (works every time)

  1. Open the log file in Notepad
  2. Press Ctrl + End (jump to the very bottom)
  3. Copy/paste the last ~40 lines here (the bottom is where the actual error/exit code is)

Meanwhile: the most likely fix for Windows

Your log shows it’s pulling libsignal-node (WhatsApp dependency). On Windows this commonly fails on Node 24 because native modules often only ship prebuilt binaries for LTS Node.

So try this:

  1. Uninstall Node 24 (Windows Settings → Apps → Installed apps → Node.js)
  2. Install Node 22 LTS from: https://nodejs.org/en/download (pick the LTS Windows installer)
  3. Open a new PowerShell and confirm:
#
node -v

(should say v22.x.x)

  1. Re-run:
iwr -useb https://openclaw.ai/install.ps1 | iex

If it still fails after Node 22, paste the last 40 lines from the bottom of the newest debug log and we’ll pinpoint the exact missing piece (usually build tools / permissions / network).

orchid merlin
#

can i send it in 2 diff messages

#

0 verbose cli C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js
1 info using npm@10.9.4
2 info using node@v22.22.1
3 silly config load:file:C:\Program Files\nodejs\node_modules\npm\npmrc
4 silly config load:file:C:\Users\dougi.npmrc
5 silly config load:file:C:\Users\dougi\AppData\Roaming\npm\etc\npmrc
6 verbose title npm exec xpm@^0.16.3 install @xpack-dev-tools/cmake@latest --no-save
7 verbose argv "exec" "--yes" "--" "xpm@^0.16.3" "install" "@xpack-dev-tools/cmake@latest" "--no-save"
8 verbose logfile logs-max:10 dir:C:\Users\dougi\AppData\Local\npm-cache_logs\2026-03-12T17_48_18_187Z-
9 verbose logfile C:\Users\dougi\AppData\Local\npm-cache_logs\2026-03-12T17_48_18_187Z-debug-0.log
10 silly logfile start cleaning logs, removing 1 files
11 silly packumentCache heap:2197815296 maxSize:549453824 maxEntrySize:274726912
12 silly logfile done cleaning log files
13 http fetch GET 200 https://registry.npmjs.org/xpm 122ms (cache revalidated)
14 silly packumentCache heap:2197815296 maxSize:549453824 maxEntrySize:274726912
15 silly packumentCache heap:2197815296 maxSize:549453824 maxEntrySize:274726912
16 verbose cwd C:\Users\dougi\AppData\Roaming\npm\node_modules\openclaw\node_modules\node-llama-cpp\llama\xpack
17 verbose os Windows_NT 10.0.19041
18 verbose node v22.22.1
19 verbose npm v10.9.4
20 verbose exit 1
21 verbose code 1

dry tinselBOT
#

Yep — totally fine.

Please do:

  • Message 1: paste the last ~40 lines, label it part 1/2
  • Message 2: paste the ~40 lines above that, label it part 2/2

If you can, wrap each paste in a code block so Discord doesn’t mangle it:

(paste here)
orchid merlin
#

(0 verbose cli C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js
1 info using npm@10.9.4
2 info using node@v22.22.1
3 silly config load:file:C:\Program Files\nodejs\node_modules\npm\npmrc
4 silly config load:file:C:\Users\dougi.npmrc
5 silly config load:file:C:\Users\dougi\AppData\Roaming\npm\etc\npmrc
6 verbose title npm exec xpm@^0.16.3 install @xpack-dev-tools/cmake@latest --no-save
7 verbose argv "exec" "--yes" "--" "xpm@^0.16.3" "install" "@xpack-dev-tools/cmake@latest" "--no-save"
8 verbose logfile logs-max:10 dir:C:\Users\dougi\AppData\Local\npm-cache_logs\2026-03-12T17_48_18_187Z-
9 verbose logfile C:\Users\dougi\AppData\Local\npm-cache_logs\2026-03-12T17_48_18_187Z-debug-0.log
10 silly logfile start cleaning logs, removing 1 files
11 silly packumentCache heap:2197815296 maxSize:549453824 maxEntrySize:274726912
12 silly logfile done cleaning log files
13 http fetch GET 200 https://registry.npmjs.org/xpm 122ms (cache revalidated)
14 silly packumentCache heap:2197815296 maxSize:549453824 maxEntrySize:274726912
15 silly packumentCache heap:2197815296 maxSize:549453824 maxEntrySize:274726912
16 verbose cwd C:\Users\dougi\AppData\Roaming\npm\node_modules\openclaw\node_modules\node-llama-cpp\llama\xpack
17 verbose os Windows_NT 10.0.19041
18 verbose node v22.22.1
19 verbose npm v10.9.4
20 verbose exit 1
21 verbose code 1
)

dry tinselBOT
#

Perfect — this log finally shows what step is failing:

It’s failing inside node-llama-cpp, trying to run:

npm exec … xpm … install @xpack-dev-tools/cmake@latest

So it’s basically: “I need CMake / a build toolchain for local llama.cpp, and that auto-install step failed”, which then makes the whole OpenClaw install fail.

You’ve got two ways forward:

Option A (easiest): skip the llama.cpp download/build during install

If you’re not trying to run local models right now, do this:

  1. Open PowerShell
  2. Run these two lines (exactly):
#
$env:NODE_LLAMA_CPP_SKIP_DOWNLOAD="true"
npm install -g openclaw@latest

Then try:

openclaw --version

Option B: install CMake on Windows (so the build can work)

Install CMake (adds cmake.exe to PATH), then re-run the install.

If you have winget:

winget install Kitware.CMake
#

After that, verify:

cmake --version

Then re-run:

npm install -g openclaw@latest

If Option A fails, paste the console output from npm install -g openclaw@latest (just the red/error part). That’ll tell us whether it’s “no prebuilt binary for your setup” (then you’ll need Option B + build tools) or something else.

#

Yep — that log is the whole thing, and it confirms the failure is node-llama-cpp trying to auto-install CMake via xpm.

Next step is to retry the install with the “skip download/build” flag enabled, in the same PowerShell window:

$env:NODE_LLAMA_CPP_SKIP_DOWNLOAD="true"
npm install -g openclaw@latest

After that, run:

openclaw --version

If npm install still fails, don’t send another debug log yet — just copy/paste the actual terminal output from the failed npm install -g openclaw@latest (the red/error lines). That output will tell us whether it’s:

  • just the CMake auto-install step failing (then we install CMake), or
  • no prebuilt binary available (then we need CMake + build tools, or WSL2).
#

If you’d rather just fix it the “always works” way on Windows, install CMake and retry:

winget install Kitware.CMake

Then reopen PowerShell and re-run the npm install -g openclaw@latest.

orchid merlin
#

npm install -g openclaw@latest
npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
npm warn deprecated glob@10.5.0: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
npm warn cleanup Failed to remove some directories [
npm warn cleanup

dry tinselBOT
#

That output is cut off right before the useful part.

Two quick questions / steps:

  1. Did you run it with the skip flag? (This matters for the node-llama-cpp/CMake issue.)
    Run it like this so it’s definitely set:
$env:NODE_LLAMA_CPP_SKIP_DOWNLOAD="true"; npm install -g openclaw@latest
  1. Please paste the rest of the output after:
    npm warn cleanup Failed to remove some directories ...

The important lines are usually at the very bottom and start with npm ERR! (code + path). Feel free to split into 2 messages again.

Also: that “cleanup failed to remove directories” warning on Windows often means files are locked (EPERM/EBUSY). If the next lines mention EPERM/EBUSY, the fastest fix is:

  • close any running openclaw / node processes, or just reboot
#
  • then rerun the install command above in a fresh PowerShell window.
orchid merlin
#

npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
npm warn deprecated glob@10.5.0: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me

dry tinselBOT
#

Those two lines are just deprecation warnings — they don’t mean the install failed.

What matters is what it prints at the very end after the command finishes.

Do this:

  1. Run (and wait until you get the PS C:\...> prompt back):
$env:NODE_LLAMA_CPP_SKIP_DOWNLOAD="true"; npm install -g openclaw@latest
  1. When it finishes, do one of these:
  • Paste the last ~15 lines of the output (the bottom part), especially any npm ERR!, or
  • Just run and paste:
openclaw --version