Skip to content

Bug: Plugin dependencies (e.g. feishu plugin) are lost after npm pack + global installation #33723

@hotejb

Description

@hotejb

Describe the bug

When upgrading OpenClaw using physical packaging (npm pack followed by npm install -g ./openclaw-*.tgz), the dependencies of workspace plugins (like @larksuiteoapi/node-sdk in extensions/feishu) are not bundled into the tarball. This causes the installed global OpenClaw to fail at runtime when loading the plugin because the node modules for the extension are missing.

To Reproduce

  1. Run npm pack in the root directory.
  2. Run npm install -g ./openclaw-*.tgz.
  3. Start the application or use the feishu plugin.
  4. See error: Error: Cannot find module '@larksuiteoapi/node-sdk'

Expected behavior

The plugin's dependencies should be properly bundled or resolved during the global installation.

Workaround

Currently, we have to manually run npm install -g @larksuiteoapi/node-sdk after the OpenClaw global installation to restore the missing dependency.

Suggested Fix

Refactor the build/packaging mechanism so that either:

  • The bundledDependencies include the required sub-module dependencies.
  • A custom build script recursively packs and injects the plugin dependencies into the main package.json before npm pack.

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