#upgrade failed

1 messages · Page 1 of 1 (latest)

woeful musk
#

viklall@vixclaw8-v2:~$ oc update
Updating OpenClaw...

│
â—‡ âś— Updating via package manager (19.03s)
npm error A complete log of this run can be found in: /home/viklall/.npm/_logs/2026-04-13T13_59_11_145Z-debug-0.log

Update Result: ERROR
Root: /home/viklall/.npm-global/lib/node_modules/openclaw
Reason: global update
Before: 2026.4.11

Total time: 19.2s
viklall@vixclaw8-v2:~$
viklall@vixclaw8-v2:~$ oclog --follow &
[1] 11320
-bash: /home/viklall/.npm-global/bin/openclaw: No such file or directory
[1]+ Exit 127 openclaw logs --follow --follow
viklall@vixclaw8-v2:~$

https://gist.github.com/viklall/0e914810fbd12d660eb550d88edc00ce

flint anchorBOT
coral wedgeBOT
#

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

flint anchorBOT
onyx mangoBOT
#

Looks like the update died in the global npm install step, and npm left the openclaw shim missing. That is why oclog now fails, it is calling a path that no longer exists.

I’d repair the install first, then run doctor:

node -v
npm -v
npm config get prefix

npm i -g openclaw@latest --no-fund --no-audit
# if that fails on native deps, retry with:
# npm i -g openclaw@latest --no-fund --no-audit --omit=optional

hash -r
command -v openclaw
openclaw --version
#
openclaw doctor --fix
openclaw gateway restart
openclaw logs --follow

Two extra notes:

  1. Your gist shows a separate config issue too:
    channels.discord.streamMode / chunkMode / blockStreaming... are legacy

    so openclaw doctor --fix is important after the reinstall.

  2. If oclog is a hardcoded alias to /home/viklall/.npm-global/bin/openclaw, update it after reinstall. Using plain openclaw logs --follow is safer.

If npm i -g ... fails again, paste these:

woeful musk
#

disk ran out of space can I remove anything before retrying, oc is all i got on this machine

onyx mangoBOT
#

Yep. Safest things to clear first are npm cache, npm debug logs, and old temp OpenClaw logs.

df -h
du -sh ~/.npm ~/.openclaw /tmp/openclaw 2>/dev/null
du -sh ~/.openclaw/agents/*/sessions 2>/dev/null

Then clean the low-risk stuff:

npm cache clean --force
rm -f ~/.npm/_logs/*
find /tmp/openclaw -type f -name 'openclaw-*.log' -mtime +1 -delete 2>/dev/null

After that, retry the repair install:

#
npm i -g openclaw@latest --no-fund --no-audit
# if native deps fail:
# npm i -g openclaw@latest --no-fund --no-audit --omit=optional

Then:

hash -r
openclaw --version
openclaw doctor --fix
openclaw gateway restart

I would not delete these:

  • ~/.openclaw/openclaw.json
#
  • ~/.openclaw/workspace
  • auth/identity files under ~/.openclaw

If you’re still tight on space after the cache/log cleanup, the next likely big thing is old session history under ~/.openclaw/agents/*/sessions, but I’d inspect sizes first before touching that since it can remove chat history.

Docs:
https://docs.openclaw.ai/help/faq#where-are-logs
https://docs.openclaw.ai/cli/sessions

If you paste the du -sh output, I can tell you the safest next target.

woeful musk
#

viklall@vixclaw8-v2:~$ du -s .*
12 .bash_history
4 .bash_logout
8 .bashrc
1310376 .cache
80 .claude
4 .claude.json
468 .codex
136 .config
156 .iterm2
28 .iterm2_shell_integration.bash
4 .lesshst
20000 .local
1086872 .npm
1838952 .npm-global
4 .npmrc
366976 .openclaw
4 .profile
12 .ssh
16 .viminfo
viklall@vixclaw8-v2:~$

onyx mangoBOT
#

Nice, this narrows it down.

Your best safe win is ~/.npm, about 1.1 GB.
That is mostly cache/logs, so clear that first.

Do not wipe ~/.npm-global. That is your actual global install prefix, including OpenClaw.

Try:

npm cache clean --force
rm -f ~/.npm/_logs/*
du -sh ~/.npm ~/.npm-global ~/.openclaw

If you still need more space after that, next inspect ~/.cache:

#
du -sh ~/.cache/* 2>/dev/null | sort -h | tail -20

Then remove only obvious app caches from there.

I would not touch:

  • ~/.npm-global
  • ~/.openclaw
  • ~/.openclaw/workspace

Also, ~/.openclaw is only about 367 MB, so it is not your main problem.

Once ~/.npm is cleared, retry:

#
npm i -g openclaw@latest --no-fund --no-audit

If you want, paste the post-cleanup du -sh ~/.npm ~/.npm-global ~/.cache ~/.openclaw and I’ll tell you the next safest cut.

onyx mangoBOT
#

That gist helps. The safest cache cuts in there are:

  • ~/.cache/node-gyp
  • ~/.cache/pip

And if you still need more space:

  • ~/.cache/ms-playwright
    Safe too, but Playwright/browser stuff will have to re-download later if you use browser automation.

I’d do this:

du -sh ~/.cache/node-gyp ~/.cache/pip ~/.cache/ms-playwright 2>/dev/null

rm -rf ~/.cache/node-gyp ~/.cache/pip
#

# if still short on space:
rm -rf ~/.cache/ms-playwright

Then also clear npm cache if you have not already:

npm cache clean --force
rm -f ~/.npm/_logs/*

After that, retry the repair install directly:

#
npm i -g openclaw@latest --no-fund --no-audit
# if native deps complain:
# npm i -g openclaw@latest --no-fund --no-audit --omit=optional

I still would not touch:

  • ~/.npm-global
  • ~/.openclaw
  • ~/.openclaw/workspace

If you want, paste just this after cleanup:

du -sh ~/.npm ~/.cache ~/.npm-global ~/.openclaw 2>/dev/null
#

and I’ll sanity check it before the reinstall.

woeful musk
#

viklall@vixclaw8-v2:~$ npm i -g openclaw@latest --no-fund --no-audit
npm error code ENOTEMPTY
npm error syscall rename
npm error path /home/viklall/.npm-global/lib/node_modules/openclaw
npm error dest /home/viklall/.npm-global/lib/node_modules/.openclaw-ya1xy06q
npm error errno -39
npm error ENOTEMPTY: directory not empty, rename '/home/viklall/.npm-global/lib/node_modules/openclaw' -> '/home/viklall/.npm-global/lib/node_modules/.openclaw-ya1xy06q'
npm error A complete log of this run can be found in: /home/viklall/.npm/_logs/2026-04-13T14_19_08_300Z-debug-0.log

onyx mangoBOT
#

Perfect, that’s the real error.

This is an npm stale rename dir problem, not an OpenClaw config problem.
npm is trying to rename openclaw to a temp folder, but that temp folder already exists:

~/.npm-global/lib/node_modules/.openclaw-ya1xy06q

Try this first:

rm -rf ~/.npm-global/lib/node_modules/.openclaw-*
npm i -g openclaw@latest --no-fund --no-audit

If it still fails, the current package dir is probably half-broken too, so do:

#
rm -rf ~/.npm-global/lib/node_modules/openclaw
npm i -g openclaw@latest --no-fund --no-audit

Then:

hash -r
command -v openclaw
openclaw --version
openclaw doctor --fix
openclaw gateway restart

Why this is okay: your current global install is already busted, the shim is gone, and npm is blocked on stale .openclaw-* temp dirs.

woeful musk
onyx mangoBOT
#

No, not from the cleanup I suggested.

What you’d be deleting is only:

  • npm cache, ~/.npm
  • generic app caches, ~/.cache/*
  • the broken global package install under ~/.npm-global/lib/node_modules/openclaw
  • stale npm temp dirs like ~/.npm-global/lib/node_modules/.openclaw-*

Your memory and sessions live elsewhere:

  • sessions/state: ~/.openclaw/agents/<agentId>/sessions/
  • workspace memory files: ~/.openclaw/workspace/ and memory/...

So as long as you do not delete ~/.openclaw or ~/.openclaw/workspace, your saved memory/session history should still be there.

The only thing you may lose is the current live process state while reinstalling/restarting, which is normal. The persisted history on disk should survive.

woeful musk
#

what is npm

onyx mangoBOT
#

npm is the Node Package Manager.

Very short version:

  • Node.js is the runtime OpenClaw is using
  • npm is the tool that installs and updates Node-based apps
  • In your case, npm is what installed OpenClaw into:

~/.npm-global/lib/node_modules/openclaw

So when I say:

npm i -g openclaw@latest

that means:

#
  • npm = the installer
  • i = install
  • -g = install globally for your user
  • openclaw@latest = install the newest OpenClaw release

You can see if it exists with:

npm -v
node -v

So basically, npm is just the app installer/updater that OpenClaw was using here.

woeful musk
#

benefits of this upgrade

onyx mangoBOT
#

From 2026.4.11 → 2026.4.12, the main benefits are:

  • Update reliability fix
    there’s a specific fix for openclaw update failing after package self-updates on stale dist/install.runtime-* chunks, so yes, this release is directly relevant to update pain.

  • Security hardening
    several fixes around approvals and shell-wrapper handling.

  • Better stability
    fixes for dropped follow-up messages, websocket keepalive/disconnect weirdness, and some channel reconnect issues.

  • New optional memory features
    there’s a new Active Memory plugin if you want the bot to recall past context/preferences more automatically.

So if you just want the short answer: yes, this is a worthwhile maintenance upgrade, mostly for bug fixes, stability, and security, not because 2026.4.11 is unusable.

For your box specifically, the biggest win is probably:

#
  1. update-path fixes
  2. stability/security fixes
  3. optional memory improvements if you enable them later
woeful musk
#

my claw said I'm currently running on OpenClaw version v22.22.2. is that the .12 ?

onyx mangoBOT
#

No, v22.22.2 is almost certainly your Node.js version, not your OpenClaw version.

OpenClaw versions look like:

  • 2026.4.11
  • 2026.4.12

Node versions look like:

  • v22.22.2

So:

  • Node: v22.22.2
  • OpenClaw: probably still 2026.4.11 until the upgrade actually succeeds

Best check:

#
node -v
openclaw --version

If openclaw --version says 2026.4.12, then yes, you made it.
If it says 2026.4.11, you’re still on the old OpenClaw release.