-
-
Notifications
You must be signed in to change notification settings - Fork 69.2k
memory-lancedb plugin: Cannot find module '@lancedb/lancedb' - native dependency resolution broken #13409
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
bugSomething isn't workingSomething isn't working
Description
Description
The memory-lancedb plugin fails to load @lancedb/lancedb at runtime, even though the module is properly installed in the extension's node_modules/ directory.
Error
memory-lancedb: failed to load LanceDB. Error: Cannot find module '@lancedb/lancedb'
Require stack:
- /opt/homebrew/lib/node_modules/openclaw/extensions/memory-lancedb/index.ts
Environment
- OpenClaw: 2026.2.6-3 (85ed6c7)
- OS: macOS (Apple Silicon, arm64)
- Node: v23.11.0
- Install method: npm global (
/opt/homebrew/lib/node_modules/openclaw/)
Steps to reproduce
- Enable
memory-lancedbplugin viaopenclaw plugins enable memory-lancedb - Configure embedding API key in config
- Restart gateway
- Try to use
memory_storetool
Investigation
The plugin uses a dynamic import('@lancedb/lancedb') in index.ts (line 29), but the error message shows Require stack, suggesting the bundled gateway resolves it differently.
What I tried (all failed):
- Installing
@lancedb/lancedb+@lancedb/lancedb-darwin-arm64in the extension's ownnode_modules/— not found - Copying deps to OpenClaw's main
node_modules/— breaks other packages (chalk ESM/CJS conflict) - Installing globally via
npm install -g— not in require path openclaw plugins install memory-lancedb— fails with chalk import error
Root cause: The gateway binary bundles extensions and resolves require() from the dist directory, not from the extension's node_modules/. Native dependencies like @lancedb/lancedb (which require platform-specific binaries) cannot be resolved this way.
Expected behavior
Plugins with native dependencies listed in their package.json should have their node_modules/ properly resolved at runtime.
Suggested fix
Either:
- Add the extension's
node_modulesto the module resolution path when loading plugins - Or provide a
openclaw plugins installcommand that properly installs native deps and wires them up
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Fields
Give feedbackNo fields configured for issues without a type.