-
-
Notifications
You must be signed in to change notification settings - Fork 69.6k
bug: Bundled extension native dependencies (@lancedb/lancedb) are lost after brew upgrade #42668
Description
Description
When openclaw is installed via Homebrew on macOS, any subsequent brew upgrade openclaw operation breaks the memory-lancedb extension. The native dependency @lancedb/lancedb is deleted and not reinstalled, causing memory functions to fail.
The error message seen in OpenClaw logs is typically: Cannot find module '@lancedb/lancedb'
To Reproduce
- Install OpenClaw via Homebrew on macOS with an arm64 architecture.
- Ensure the
memory-lancedbextension is enabled and functional. - Wait for a new version of OpenClaw to be published.
- Run
brew upgrade openclaw. - Attempt to use a memory-related feature. It will fail.
Analysis
The root cause appears to be the update process replacing the /opt/homebrew/lib/node_modules/openclaw directory. This removes the nested node_modules directory located at extensions/memory-lancedb/node_modules, which contains the compiled @lancedb/lancedb package.
Because @lancedb/lancedb is likely not a direct dependency in the main package.json (as it's specific to an extension), npm does not automatically reinstall it during the upgrade.
A temporary workaround is to run npm install @lancedb/lancedb inside the /opt/homebrew/lib/node_modules/openclaw/extensions/memory-lancedb directory after every upgrade.
Proposed Solution
The main openclaw package should probably include a postinstall script that iterates through bundled extensions and runs npm install within each one to ensure their dependencies are met after installation or upgrades.
Environment
- OS: macOS (arm64)
- Package Manager: Homebrew
- OpenClaw Version: All recent versions