openclaw - ✅(Solved) Fix [Bug] Upgrading openclaw removes node-llama-cpp, breaking local embeddings [1 pull requests, 1 comments, 2 participants]

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…
GitHub stats
openclaw/openclaw#66433Fetched 2026-04-15 06:26:10
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Participants
Timeline (top)
commented ×1cross-referenced ×1mentioned ×1referenced ×1

Fix Action

Workaround

Run npm install -g node-llama-cpp --build-from-source=false after each upgrade.

PR fix notes

PR #66586: fix: restore node-llama-cpp as optionalDependency (fix #66433)

Description (problem / solution / changelog)

Summary

Upgrading openclaw via npm i -g openclaw@latest removes node-llama-cpp, breaking local embeddings functionality.

Root Cause

node-llama-cpp was moved from optionalDependencies to peerDependencies with optional: true. npm does NOT auto-install peer dependencies during global package upgrades, so node-llama-cpp gets removed when upgrading openclaw.

Fix

Move node-llama-cpp back to optionalDependencies, where npm will auto-install and auto-remove it together with openclaw.

Changes

  1. package.json: Move node-llama-cpp from peerDependencies to optionalDependencies
  2. scripts/openclaw-npm-release-check.ts: Update release validation to check optionalDependencies instead of peerDependencies
  3. src/memory-host-sdk/host/embeddings.ts: Fix misleading error message (now accurate since npm will install it automatically)

Testing

  • npm i -g openclaw@latest will now automatically install node-llama-cpp
  • Upgrading openclaw will keep node-llama-cpp installed ✓
  • Error message now correctly states npm will install it automatically ✓

Fixes #66433

Changed files

  • extensions/qqbot/src/gateway.ts (modified, +1/-1)
  • extensions/qqbot/src/utils/text-parsing.test.ts (modified, +4/-0)
  • extensions/qqbot/src/utils/text-parsing.ts (modified, +2/-2)
  • package.json (modified, +2/-7)
  • scripts/openclaw-npm-release-check.ts (modified, +4/-6)
  • src/memory-host-sdk/host/embeddings.ts (modified, +1/-1)
RAW_BUFFERClick to expand / collapse

Bug Description

When upgrading openclaw via npm i -g openclaw@latest, the optional dependency node-llama-cpp is removed, causing local embeddings to fail.

Steps to Reproduce

  1. Have node-llama-cpp installed and working (openclaw memory status shows Provider: local)
  2. Run npm i -g openclaw@latest
  3. Run openclaw memory status → fails with "Local embeddings unavailable"

Expected

openclaw upgrades should not remove optional dependencies like node-llama-cpp.

Workaround

Run npm install -g node-llama-cpp --build-from-source=false after each upgrade.

Additional Context

  • Model file at ~/.node-llama-cpp/models/hf_ggml-org_embeddinggemma-300m-qat-Q8_0.gguf is preserved
  • Only the npm package node-llama-cpp is removed during openclaw upgrade
  • Node.js version: v22.22.1
  • npm version: 10.9.4

extent analysis

TL;DR

Reinstalling the node-llama-cpp package after upgrading openclaw using npm install -g node-llama-cpp --build-from-source=false may resolve the issue with local embeddings failing due to the removal of the optional dependency.

Guidance

  • Verify that the node-llama-cpp package is indeed removed after upgrading openclaw by checking the package list with npm ls -g node-llama-cpp.
  • Run the provided workaround command npm install -g node-llama-cpp --build-from-source=false to reinstall the package and check if local embeddings are restored by running openclaw memory status.
  • Ensure that the model file at ~/.node-llama-cpp/models/hf_ggml-org_embeddinggemma-300m-qat-Q8_0.gguf is preserved and not modified during the upgrade process.
  • Consider adding the node-llama-cpp package as a separate dependency in your project to prevent it from being removed during future upgrades.

Example

No code snippet is necessary for this issue, as the solution involves running a specific npm command.

Notes

This workaround assumes that the issue is solely due to the removal of the node-llama-cpp package during the openclaw upgrade. If other factors are contributing to the problem, additional troubleshooting may be necessary.

Recommendation

Apply the workaround by running npm install -g node-llama-cpp --build-from-source=false after each openclaw upgrade, as this has been confirmed to restore the local embeddings functionality.

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 - ✅(Solved) Fix [Bug] Upgrading openclaw removes node-llama-cpp, breaking local embeddings [1 pull requests, 1 comments, 2 participants]