Skip to content

[Bug]: grammy module missing after every update - telegram extension breaks repeatedly #70615

Description

@tutumomo

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

After every openclaw update, the grammy module is missing from dist/extensions/telegram/node_modules/, causing openclaw doctor to fail with "Cannot find module 'grammy'" and breaking the entire Telegram channel. Happened at least 2 consecutive updates.

Steps to reproduce

  1. Install OpenClaw via Homebrew (/opt/homebrew/lib/node_modules/openclaw/)
  2. Configure a Telegram channel (bot token, etc.)
  3. Run openclaw update when a new version becomes available
  4. Run openclaw doctor
  5. Observe: Error: Cannot find module 'grammy' — Require stack: /opt/homebrew/lib/node_modules/openclaw/dist/extensions/telegram/allowed-updates-BD2bJyzD.js
  6. Telegram channel is broken; gateway cannot start properly for Telegram

Expected behavior

After openclaw update, the Telegram extension should have all its dependencies available. Either:

  • openclaw doctor --fix should auto-install grammy (like it does for acpx, node-edge-tts, playwright-core), OR
  • The update/package process should ship grammy inside dist/extensions/telegram/node_modules/, OR
  • The update process should run npm install for extensions declaring their own dependencies.

Actual behavior

openclaw doctor fails with Cannot find module 'grammy'. The telegram extension's package.json declares "grammy": "^1.42.0" as a dependency, but dist/extensions/telegram/node_modules/ does not exist after update. The module must be manually installed with cd /opt/homebrew/lib/node_modules/openclaw/dist/extensions/telegram && npm install --production. This workaround must be repeated after every single update.

OpenClaw version

2026.4.21 (f788c88)

Operating system

macOS Darwin 25.4.0

Install method

Homebrew (/opt/homebrew/lib/node_modules/openclaw/)

Model

N/A (packaging bug, not model-related)

Provider / routing chain

N/A (packaging bug, not model-related)

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Error output from openclaw update:

Error: Cannot find module 'grammy'
Require stack:
- /opt/homebrew/lib/node_modules/openclaw/dist/extensions/telegram/allowed-updates-BD2bJyzD.js


Telegram extension package.json confirms the dependency:

"dependencies": { "grammy": "^1.42.0" }


openclaw doctor --fix installs acpx, node-edge-tts but NOT grammy. grammy is missing from the bundled plugin deps auto-install list.

Impact and severity

Affected: All Homebrew-installed OpenClaw users with Telegram channel configured
Severity: High — completely breaks Telegram channel after every update
Frequency: Always — 2/2 consecutive updates observed (versions before and including 2026.4.21)
Consequence: Telegram bot goes offline after every update; agents cannot send/receive Telegram messages until user manually fixes

Additional information

Root cause analysis:

  1. openclaw update replaces the entire install directory, wiping manually-installed node_modules
  2. grammy is NOT in openclaw doctor --fix's bundled plugin deps list (only [email protected], node-edge-tts@^1.2.10, [email protected] are auto-installed)
  3. The npm/homebrew package does not ship dist/extensions/telegram/node_modules/

This is a packaging/pack-out gap, not a runtime regression. The fix should be to add grammy (and other telegram extension deps like @grammyjs/runner, @grammyjs/transformer-throttler, undici) to the doctor --fix bundled deps list, or to include extension node_modules in the package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingbug:behaviorIncorrect behavior without a crash

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions