Skip to content

Plugin upgrade doesn't install npm dependencies, breaks feishu channel #61115

@smallmj

Description

@smallmj

Bug Description

When upgrading a plugin that contains npm dependencies (e.g. openclaw-lark which requires @larksuiteoapi/node-sdk), the upgrade mechanism only replaces the plugin files but does NOT run npm install. This causes the plugin to fail loading with Cannot find module '@larksuiteoapi/node-sdk'.

Steps to Reproduce

  1. Have openclaw-lark plugin installed and working
  2. Ask OpenClaw (via Feishu or any channel) to upgrade the plugin
  3. Restart the gateway (or it restarts itself)
  4. The plugin fails to load because dependencies are not installed

Expected Behavior

Plugin upgrade should install npm dependencies after replacing plugin files, or at minimum warn the user that a manual npm install is needed in the plugin directory.

Actual Behavior

  • Plugin files are replaced (version updated)
  • node_modules directory is NOT updated
  • Gateway fails to load the plugin with: Cannot find module '@larksuiteoapi/node-sdk'

Environment

  • OpenClaw version: (check via openclaw-gateway --version)
  • Plugin: openclaw-lark version 2026.4.1
  • Platform: Linux (Ubuntu)
  • Channel: Feishu (websocket mode)

Workaround

Manually run npm install in the plugin directory:

cd ~/.openclaw/extensions/openclaw-lark && npm install

Additional Context

  • This issue is triggered regardless of whether the upgrade is requested via Feishu chat, CLI, or other channels
  • The issue appears to be in the plugin upgrade mechanism itself, not in the model or the channel used to trigger the upgrade
  • If the plugin had no npm dependencies (single-file JS plugin), this would not occur

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