-
Notifications
You must be signed in to change notification settings - Fork 552
Description
Plugin Version
OpenClaw Version
2026.3.13
Bug Description
Bug 回報資料(英文)
Issue: LanceDB Pro CLI (cli.ts) Cannot Run Standalone
Environment:
• OS: Linux 6.17.0 (x64)
• Node.js: v22.22.1
• Plugin version: 63d4750 (latest, 2026-03-21)
• Platform: OpenClaw plugin installed at /home/friday/.openclaw/workspace/plugins/memory-lancedb-pro/
Problem Description:
The cli.ts file cannot be executed as a standalone CLI tool. All attempts to run it directly fail with module resolution errors.
Root Causes (multiple):
- No entry point:
cli.tshas nomain()function and noif __name__ == "__main__"guard. It only exportscreateMemoryCLI(), a factory function that expects a pre-constructedCLIContextobject. - Missing
bininpackage.json: The package declares no CLI binary, so there's no canonical way to invoke it vianpxor a global command. src/store.jsdoes not exist at runtime:cli.tsimports./src/store.jsand./src/retriever.jsusing.jsextensions, but only.tssource files exist insrc/. The OpenClaw plugin usesjitifor on-the-fly TypeScript compilation, which works for the plugin runtime but not for standalone CLI execution.- No
tsconfig.jsonfor standalone compilation: Attempting to compile withtscfails with strict TypeScript errors (8 errors including type mismatches and implicitany).
Attempted Fixes:
| Attempt | Result | Notes |
| ----------------------------------------- | --------------------- | ------------------------------------------------- |
| node cli.ts | ❌ Error | Tries to import .js files that don't exist |
| npx tsx cli.ts | ❌ No output | Silent failure, exits code 0 but produces nothing |
| npx jiti cli.ts | ❌ Error | jiti loader not exported in package.json exports |
| node --import jiti/register cli.ts | ❌ No output | Silent failure |
| tsc compilation | ❌ 8 TypeScript errors | Strict mode type errors in source files |
| Add tsx as devDependency + npx tsx cli.ts | ❌ No output | CLI runs but produces no response |
Minimal Fix Required (any one of):
- Add a standalone entry point: Create a
src/cli-main.tsthat constructs theCLIContextand callscreateMemoryCLI(), then export it as thebininpackage.json. - Or: Export
main()fromcli.ts: Add a function that can be called directly with the necessary context. - Or: Add
tsconfig.json+ build step: Compile.ts→.jssocli.tscan find its imports.
Error Messages:
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/home/friday/.../memory-lancedb-pro/src/store.js'
(node:internal/modules/esm/resolve:275)
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './loader' is not defined by "exports"
Impact:
Users cannot invoke memory-lancedb-pro recall or any other CLI command directly. The recall functionality is only accessible through the OpenClaw plugin framework (via memory_recall tool registration), not as a standalone CLI.
Expected Behavior
N/A
Steps to Reproduce
N/A
Error Logs / Screenshots
Embedding Provider
None
OS / Platform
ubuntu 24.04