Skip to content

bug: Bundled extension native dependencies (@lancedb/lancedb) are lost after brew upgrade #42668

@v3ctorbot

Description

@v3ctorbot

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

  1. Install OpenClaw via Homebrew on macOS with an arm64 architecture.
  2. Ensure the memory-lancedb extension is enabled and functional.
  3. Wait for a new version of OpenClaw to be published.
  4. Run brew upgrade openclaw.
  5. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions