Bug Description
The v1.1.0-beta.10 release reintroduces a CommonJS require() call inside an ESM module, breaking memory-pro stats, memory-pro search, and any memory_recall/store/forget tool usage on macOS/Linux.
Steps to Reproduce
- Install
memory-lancedb-pro@1.1.0-beta.10 via OpenClaw 2026.6.8 on macOS 25.5 (arm64)
- Configure with any working embedding provider (e.g. OpenAI-compatible Ollama bge-m3)
- Run
openclaw memory-pro stats (or any other memory-pro command)
- Plugin loads fine but every command fails:
Failed to get statistics: Error: Dynamic require of "@lancedb/lancedb" is not supported
Root Cause
In dist/src/store.js (compiled from src/store.ts), loadLanceDB() uses:
lancedbImportPromise = Promise.resolve(require("@lancedb/lancedb"));
The misleading source comment claims this is needed "to avoid ESM URL scheme issues on Windows", but memory-lancedb-pro is an ESM module ("type": "module" in package.json), and ESM modules cannot use CommonJS require() anywhere — including macOS/Linux.
Version Comparison
| Version |
loadLanceDB() Implementation |
macOS/Linux |
v1.0.16 |
lancedbImportPromise = import("@lancedb/lancedb"); |
✅ works |
v1.1.0-beta.10 |
lancedbImportPromise = Promise.resolve(require("@lancedb/lancedb")); |
❌ broken |
master (commit 79fe383) |
lancedbImportPromise = Promise.resolve(requireCJS("@lancedb/lancedb")); (createRequire-based) |
✅ works |
Related Issues
This is closely related to issue #890 ("Committed dist is stale relative to src: shipped builds miss the process.report.excludeNetwork hang guard") — both stem from the same root cause: v1.1.0-beta.10 was tagged without rebuilding dist from the current main branch src.
Temporary Workaround
Patch the three compiled files in-place (will be overwritten on next plugin reinstall/upgrade):
- lancedbImportPromise = Promise.resolve(__require("@lancedb/lancedb"));
+ lancedbImportPromise = import("@lancedb/lancedb");
Files affected:
dist/src/store.js (line ~22)
dist/cli.js (line ~1429)
dist/index.js (line ~3183)
Suggested Fix
Rebuild dist from current master and tag a v1.1.0 (non-beta) release, or cherry-pick commit 79fe383 ("fix(store): use createRequire for cross-platform LanceDB loading") into a new v1.1.0-beta.11 patch release.
Environment
- OpenClaw 2026.6.8 (844f405)
- Node.js v22.22.1
- macOS Darwin 25.5.0 (arm64)
@lancedb/lancedb@^0.26.2
- Plugin version:
1.1.0-beta.10
Impact
- Users who installed via OpenClaw marketplace / ClawHub cannot use the plugin at all without manual patching
- The macOS/Linux user base (most OpenClaw users) is fully blocked
- Documentation / blog references to
memory-lancedb-pro are now misleading until fixed
Thanks for the great plugin — happy to test any patch release.
Bug Description
The
v1.1.0-beta.10release reintroduces a CommonJSrequire()call inside an ESM module, breakingmemory-pro stats,memory-pro search, and anymemory_recall/store/forgettool usage on macOS/Linux.Steps to Reproduce
memory-lancedb-pro@1.1.0-beta.10via OpenClaw 2026.6.8 on macOS 25.5 (arm64)openclaw memory-pro stats(or any othermemory-procommand)Root Cause
In
dist/src/store.js(compiled fromsrc/store.ts),loadLanceDB()uses:The misleading source comment claims this is needed "to avoid ESM URL scheme issues on Windows", but
memory-lancedb-prois an ESM module ("type": "module"inpackage.json), and ESM modules cannot use CommonJSrequire()anywhere — including macOS/Linux.Version Comparison
loadLanceDB()Implementationv1.0.16lancedbImportPromise = import("@lancedb/lancedb");v1.1.0-beta.10lancedbImportPromise = Promise.resolve(require("@lancedb/lancedb"));master(commit 79fe383)lancedbImportPromise = Promise.resolve(requireCJS("@lancedb/lancedb"));(createRequire-based)Related Issues
This is closely related to issue #890 ("Committed dist is stale relative to src: shipped builds miss the process.report.excludeNetwork hang guard") — both stem from the same root cause:
v1.1.0-beta.10was tagged without rebuilding dist from the current main branch src.Temporary Workaround
Patch the three compiled files in-place (will be overwritten on next plugin reinstall/upgrade):
Files affected:
dist/src/store.js(line ~22)dist/cli.js(line ~1429)dist/index.js(line ~3183)Suggested Fix
Rebuild dist from current
masterand tag av1.1.0(non-beta) release, or cherry-pick commit 79fe383 ("fix(store): use createRequire for cross-platform LanceDB loading") into a newv1.1.0-beta.11patch release.Environment
@lancedb/lancedb@^0.26.21.1.0-beta.10Impact
memory-lancedb-proare now misleading until fixedThanks for the great plugin — happy to test any patch release.