openclaw - 💡(How to fix) Fix Bug: npm updates drop node-llama-cpp, breaking local memory_search after every OpenClaw update

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

After each recent npm-based OpenClaw update, local memory_search stops working because the node-llama-cpp optional dependency is no longer present under the installed OpenClaw package directory.

This has happened repeatedly on the same Linux host after OpenClaw updates. The workaround is always to manually reinstall node-llama-cpp into the OpenClaw package prefix and then retest memory_search.

Error Message

results: [] disabled: true unavailable: true error: Local embeddings unavailable. Reason: optional dependency node-llama-cpp is missing (or failed to install). Detail: Cannot find package 'node-llama-cpp' imported from /home/openclaw/.npm-global/lib/node_modules/openclaw/dist/embeddings-C9YA6RhB.js

Root Cause

For agents configured to rely on local/free memory search, every npm update silently removes or fails to preserve the native local embeddings dependency. The gateway can otherwise look healthy, so the breakage only appears when an agent tries to recall memory.

Fix Action

Fix / Workaround

This has happened repeatedly on the same Linux host after OpenClaw updates. The workaround is always to manually reinstall node-llama-cpp into the OpenClaw package prefix and then retest memory_search.

Workaround that fixes it

Code Example

results: []
disabled: true
unavailable: true
error: Local embeddings unavailable.
Reason: optional dependency node-llama-cpp is missing (or failed to install).
Detail: Cannot find package 'node-llama-cpp' imported from /home/openclaw/.npm-global/lib/node_modules/openclaw/dist/embeddings-C9YA6RhB.js

---

Memory-Search-Abhaengigkeit
[PROBLEM] node-llama-cpp fehlt im OpenClaw-Paket; memory_search danach im Chat testen/reparieren

---

npm install --no-save node-llama-cpp@3.18.1 --prefix /home/openclaw/.npm-global/lib/node_modules/openclaw
cd /home/openclaw/.npm-global/lib/node_modules/openclaw && node -e "import('node-llama-cpp').then(()=>console.log('ok'))"

---

provider: local
model: hf:ggml-org/embeddinggemma-300m-qat-q8_0-GGUF/embeddinggemma-300m-qat-Q8_0.gguf
hits: 3

---

CLI version: 2026.5.28
Package version: 2026.5.28
Gateway version: 2026.5.28
node-llama-cpp present
OK: 8 | Hinweise: 0 | Probleme: 0
RAW_BUFFERClick to expand / collapse

Summary

After each recent npm-based OpenClaw update, local memory_search stops working because the node-llama-cpp optional dependency is no longer present under the installed OpenClaw package directory.

This has happened repeatedly on the same Linux host after OpenClaw updates. The workaround is always to manually reinstall node-llama-cpp into the OpenClaw package prefix and then retest memory_search.

Environment

  • OpenClaw before latest update: 2026.5.27
  • OpenClaw after latest update: 2026.5.28 (e932160)
  • Install kind: global npm package under /home/openclaw/.npm-global/lib/node_modules/openclaw
  • Node.js: v24.15.0
  • npm: 11.12.1
  • Gateway: systemd user service, loopback 127.0.0.1:18789
  • Memory provider: local embeddings
  • Expected local model: hf:ggml-org/embeddinggemma-300m-qat-q8_0-GGUF/embeddinggemma-300m-qat-Q8_0.gguf

Repro / observed flow

  1. Update OpenClaw via npm from 2026.5.27 to 2026.5.28.
  2. Restart the gateway.
  3. Run a local memory_search tool call.

Actual result

memory_search becomes unavailable:

results: []
disabled: true
unavailable: true
error: Local embeddings unavailable.
Reason: optional dependency node-llama-cpp is missing (or failed to install).
Detail: Cannot find package 'node-llama-cpp' imported from /home/openclaw/.npm-global/lib/node_modules/openclaw/dist/embeddings-C9YA6RhB.js

npm ls -g --depth=0 node-llama-cpp openclaw only showed [email protected]; node-llama-cpp was absent.

A local post-update check also flagged the dependency as missing:

Memory-Search-Abhaengigkeit
[PROBLEM] node-llama-cpp fehlt im OpenClaw-Paket; memory_search danach im Chat testen/reparieren

Expected result

After an OpenClaw npm update, local memory_search should keep working without manually reinstalling node-llama-cpp into the OpenClaw package directory.

At minimum, the update flow or doctor should detect this condition and offer a direct repair step.

Workaround that fixes it

npm install --no-save [email protected] --prefix /home/openclaw/.npm-global/lib/node_modules/openclaw
cd /home/openclaw/.npm-global/lib/node_modules/openclaw && node -e "import('node-llama-cpp').then(()=>console.log('ok'))"

After this, the same memory_search call succeeds again:

provider: local
model: hf:ggml-org/embeddinggemma-300m-qat-q8_0-GGUF/embeddinggemma-300m-qat-Q8_0.gguf
hits: 3

The post-update check then passes:

CLI version: 2026.5.28
Package version: 2026.5.28
Gateway version: 2026.5.28
node-llama-cpp present
OK: 8 | Hinweise: 0 | Probleme: 0

Why this matters

For agents configured to rely on local/free memory search, every npm update silently removes or fails to preserve the native local embeddings dependency. The gateway can otherwise look healthy, so the breakage only appears when an agent tries to recall memory.

Related context

This seems adjacent to local memory/provider work such as #70596 and #70873, but the issue here is specifically the npm update/install result: node-llama-cpp disappears from the installed OpenClaw package prefix and must be reinstalled manually after updates.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Bug: npm updates drop node-llama-cpp, breaking local memory_search after every OpenClaw update