Skip to content

v4.1 update: bundled plugin deps not installed (Telegram/Discord broken after update) #59286

Description

@butttersbot

Bug Report

Version

4.1 (upgrading from a prior version)

OS

macOS 26.3 (arm64) / Mac mini

What happened

After updating to OpenClaw 4.1, Telegram and Discord plugins fail to load with Cannot find module errors. The gateway starts but plugins are completely broken.

Error output

[plugins] telegram failed to load: Error: Cannot find module 'grammy'
[plugins] discord failed to load: Error: Cannot find module '@buape/carbon'

Subsequent restarts revealed additional missing deps in sequence:

  • grammy
  • @buape/carbon
  • @grammyjs/runner
  • @grammyjs/transformer-throttler

Root cause

The postinstall script (scripts/postinstall-bundled-plugins.mjs) failed silently during the npm update due to a sharp build error, leaving plugin dependencies uninstalled. The gateway continued running with stale bundled code that required these packages.

Workaround

Manually install the missing packages:

cd /opt/homebrew/lib/node_modules/openclaw
npm install grammy @buape/carbon @grammyjs/runner @grammyjs/transformer-throttler

Then restart the gateway.

Expected behavior

The update process should either:

  1. Ensure postinstall completes successfully (or retries) before the new version goes live, OR
  2. Surface a clear error/warning to the user that plugin deps are missing and Telegram/Discord won't work until npm install is re-run manually

Steps to reproduce

  1. Run openclaw update (or npm install -g openclaw) to upgrade to 4.1
  2. Restart the gateway
  3. Run openclaw status — Telegram and Discord show load failures

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions