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-lancedb extension 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
Description
When
openclawis installed via Homebrew on macOS, any subsequentbrew upgrade openclawoperation breaks thememory-lancedbextension. The native dependency@lancedb/lancedbis 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
memory-lancedbextension is enabled and functional.brew upgrade openclaw.Analysis
The root cause appears to be the update process replacing the
/opt/homebrew/lib/node_modules/openclawdirectory. This removes the nestednode_modulesdirectory located atextensions/memory-lancedb/node_modules, which contains the compiled@lancedb/lancedbpackage.Because
@lancedb/lancedbis likely not a direct dependency in the mainpackage.json(as it's specific to an extension),npmdoes not automatically reinstall it during the upgrade.A temporary workaround is to run
npm install @lancedb/lancedbinside the/opt/homebrew/lib/node_modules/openclaw/extensions/memory-lancedbdirectory after every upgrade.Proposed Solution
The main
openclawpackage should probably include apostinstallscript that iterates through bundledextensionsand runsnpm installwithin each one to ensure their dependencies are met after installation or upgrades.Environment