fix(memory-lancedb): [P1] add missing runtime deps — plugin broken on every global install#22692
Closed
mahsumaktas wants to merge 3 commits intoopenclaw:mainfrom
Closed
fix(memory-lancedb): [P1] add missing runtime deps — plugin broken on every global install#22692mahsumaktas wants to merge 3 commits intoopenclaw:mainfrom
mahsumaktas wants to merge 3 commits intoopenclaw:mainfrom
Conversation
…installs `@lancedb/lancedb` declares `apache-arrow` as a peer dependency and `reflect-metadata` as a regular dependency, but pnpm workspace hoisting places the resolved packages under `node_modules/.ignored/` instead of the standard resolution path. When OpenClaw is installed globally via `npm install -g openclaw`, Node.js cannot resolve these at runtime: Error: Cannot find module 'apache-arrow' Require stack: - @lancedb/lancedb/dist/arrow.js This breaks `memory_store`, `memory_recall`, and all memory operations on every platform. Fix: promote the implicit peer/transitive dependencies to explicit entries in the extension's own package.json so they are always installed alongside @lancedb/lancedb regardless of hoisting strategy: - apache-arrow (peer dep of @lancedb/lancedb, range >=15.0.0 <=18.1.0) - flatbuffers (dep of apache-arrow, lost during hoisting) - reflect-metadata (dep of @lancedb/lancedb embedding registry) - Platform-specific native bindings as optionalDependencies Fixes #22687 Related: #19466 (Docker variant of the same issue)
added 2 commits
February 21, 2026 17:34
…e.json Platform native bindings are already optional deps of @lancedb/lancedb itself. Listing them explicitly causes pnpm frozen-lockfile to fail in CI because the lockfile is platform-specific (generated on macOS ARM64 but CI runs on Linux).
|
This pull request has been automatically marked as stale due to inactivity. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Severity: P1 — memory-lancedb is non-functional on global npm installs (all platforms)
The
memory-lancedbextension fails to load on any globally installed OpenClaw instance.memory_store,memory_recall, and all long-term memory operations are broken.Root Cause
@lancedb/lancedb@0.26.2has runtime dependencies that aren't explicitly listed inextensions/memory-lancedb/package.json:apache-arrow@lancedb/lancedb.ignored/flatbuffersapache-arrowreflect-metadata@lancedb/lancedb(embedding registry).ignored/by pnpm workspacenode_modules/.ignored/instead of the standardnode_modules/path. When the extension's code doesrequire('apache-arrow')at runtime, Node.js resolution can't find it.Fix
Single-file change: promote implicit peer/transitive dependencies to explicit entries in
extensions/memory-lancedb/package.json."dependencies": { "@lancedb/lancedb": "^0.26.2", "@sinclair/typebox": "0.34.48", + "apache-arrow": ">=15.0.0 <=18.1.0", + "flatbuffers": "^24.3.25", "openai": "^6.22.0", + "reflect-metadata": "^0.2.2" },Version ranges are exact matches from npm registry:
apache-arrow: matches@lancedb/lancedb@0.26.2's peer dep range (>=15.0.0 <=18.1.0)flatbuffers: matchesapache-arrow@18.x's dependency (^24.3.25)reflect-metadata: matches@lancedb/lancedb@0.26.2's dependency (^0.2.2)Why this approach
shamefully-hoist=truein.npmrcpnpm.overridesnpm install(only pnpm workspace)Scope
extensions/memory-lancedb/package.jsonapache-arrow,flatbuffers,reflect-metadata)Reproduction
Verified
Tested on macOS ARM64 (M4) with OpenClaw v2026.2.19-2. After manually installing these deps into the extension's
node_modules, memory-lancedb loads and operates correctly:Note:
exportsfield gap in@lancedb/lancedbThere is a separate upstream issue:
@lancedb/lancedb'spackage.jsonexportsfield doesn't expose./dist/arrow, which OpenClaw's extension code requires. This needs either an upstream LanceDB fix or a build-time patch in OpenClaw. Filed separately — this PR focuses on the dependency resolution fix which addresses the most common failure mode.Fixes #22687
Related: #19466 (Docker variant of the same issue)
Greptile Summary
Promotes implicit peer and transitive dependencies to explicit entries in
extensions/memory-lancedb/package.jsonto fix global npm install failures. The@lancedb/lancedb@0.26.2package has peer dependencies (apache-arrow) and runtime dependencies (reflect-metadata) that pnpm's workspace hoisting places undernode_modules/.ignored/, making them unresolvable at runtime. This PR correctly adds these as explicit dependencies with version ranges that match the upstream package requirements.Key changes:
apache-arrow(>=15.0.0 <=18.1.0) matching@lancedb/lancedb's peer dependency rangeflatbuffers(^24.3.25) as transitive dependency ofapache-arrowreflect-metadata(^0.2.2) matching@lancedb/lancedb's dependencyThis approach aligns with the repository guidelines in
AGENTS.md:12which states "runtime deps must live independencies" for plugin installations.Confidence Score: 5/5
Last reviewed commit: d4b3756