openclaw - ✅(Solved) Fix [Bug]: Post 4.21 update; "Cannot find module `grammy`", maybe telegram related. [1 pull requests, 1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#70137Fetched 2026-04-23 07:28:50
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Timeline (top)
labeled ×2closed ×1commented ×1cross-referenced ×1

After installing the 2026.4.21 update, gateway won't come up. Doctor after doctor --fix says:

Failed to read config at /home/scotter/.openclaw/openclaw.json Error: Cannot find module 'grammy'
Require stack:
- /home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]_@[email protected]/node_modules/openclaw/dist/extensions/telegram/allowed-updates-BD2bJyzD.js
    at Function._resolveFilename (node:internal/modules/cjs/loader:1383:15)
    at Function.resolve (node:internal/modules/helpers:157:19)
    at jitiResolve (/home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]/node_modules/jiti/dist/jiti.cjs:1:148703)
    at jitiRequire (/home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]/node_modules/jiti/dist/jiti.cjs:1:150290)
    at /home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]/node_modules/jiti/dist/jiti.cjs:1:157987
    at /home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]_@[email protected]/node_modules/openclaw/dist/extensions/telegram/allowed-updates-BD2bJyzD.js:1:245
    at eval_evalModule (/home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]/node_modules/jiti/dist/jiti.cjs:1:155533)
    at jitiRequire (/home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]/node_modules/jiti/dist/jiti.cjs:1:150967)
    at /home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]/node_modules/jiti/dist/jiti.cjs:1:157987
    at /home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]_@[email protected]/node_modules/openclaw/dist/extensions/telegram/probe-CMHHfwas.js:6:31 {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]_@[email protected]/node_modules/openclaw/dist/extensions/telegram/allowed-updates-BD2bJyzD.js'
  ]
}

Invalid config:
- <root>: read failed: Error: Cannot find module 'grammy'
Require stack:
- /home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]_@[email protected]/node_modules/openclaw/dist/extensions/telegram/allowed-updates-BD2bJyzD.js

Error Message

Failed to read config at /home/scotter/.openclaw/openclaw.json Error: Cannot find module 'grammy' Require stack:

  • /home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]_@[email protected]/node_modules/openclaw/dist/extensions/telegram/allowed-updates-BD2bJyzD.js at Function.resolveFilename (node:internal/modules/cjs/loader:1383:15) at Function.resolve (node:internal/modules/helpers:157:19) at jitiResolve (/home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]/node_modules/jiti/dist/jiti.cjs:1:148703) at jitiRequire (/home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]/node_modules/jiti/dist/jiti.cjs:1:150290) at /home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]/node_modules/jiti/dist/jiti.cjs:1:157987 at /home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]@[email protected]/node_modules/openclaw/dist/extensions/telegram/allowed-updates-BD2bJyzD.js:1:245 at eval_evalModule (/home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]/node_modules/jiti/dist/jiti.cjs:1:155533) at jitiRequire (/home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]/node_modules/jiti/dist/jiti.cjs:1:150967) at /home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]/node_modules/jiti/dist/jiti.cjs:1:157987 at /home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]_@[email protected]/node_modules/openclaw/dist/extensions/telegram/probe-CMHHfwas.js:6:31 { code: 'MODULE_NOT_FOUND', requireStack: [ '/home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]_@[email protected]/node_modules/openclaw/dist/extensions/telegram/allowed-updates-BD2bJyzD.js' ] }

Invalid config:

  • <root>: read failed: Error: Cannot find module 'grammy' Require stack:
  • /home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]_@[email protected]/node_modules/openclaw/dist/extensions/telegram/allowed-updates-BD2bJyzD.js

Root Cause

After installing the 2026.4.21 update, gateway won't come up. Doctor after doctor --fix says:

Failed to read config at /home/scotter/.openclaw/openclaw.json Error: Cannot find module 'grammy'
Require stack:
- /home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]_@[email protected]/node_modules/openclaw/dist/extensions/telegram/allowed-updates-BD2bJyzD.js
    at Function._resolveFilename (node:internal/modules/cjs/loader:1383:15)
    at Function.resolve (node:internal/modules/helpers:157:19)
    at jitiResolve (/home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]/node_modules/jiti/dist/jiti.cjs:1:148703)
    at jitiRequire (/home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]/node_modules/jiti/dist/jiti.cjs:1:150290)
    at /home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]/node_modules/jiti/dist/jiti.cjs:1:157987
    at /home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]_@[email protected]/node_modules/openclaw/dist/extensions/telegram/allowed-updates-BD2bJyzD.js:1:245
    at eval_evalModule (/home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]/node_modules/jiti/dist/jiti.cjs:1:155533)
    at jitiRequire (/home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]/node_modules/jiti/dist/jiti.cjs:1:150967)
    at /home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]/node_modules/jiti/dist/jiti.cjs:1:157987
    at /home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]_@[email protected]/node_modules/openclaw/dist/extensions/telegram/probe-CMHHfwas.js:6:31 {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]_@[email protected]/node_modules/openclaw/dist/extensions/telegram/allowed-updates-BD2bJyzD.js'
  ]
}

Invalid config:
- <root>: read failed: Error: Cannot find module 'grammy'
Require stack:
- /home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]_@[email protected]/node_modules/openclaw/dist/extensions/telegram/allowed-updates-BD2bJyzD.js

Fix Action

Fixed

PR fix notes

PR #70190: fix(telegram): align grammy version spec to installed 1.41.x

Description (problem / solution / changelog)

Fixes #70137 (also tracked as #69831).

Problem

After upgrading to v2026.4.21, the gateway crash-loops on startup with:

Config invalid
File: ~/.openclaw/openclaw.json
Problem:
  - <root>: read failed: Error: Cannot find module 'grammy'
Require stack:
- .../dist/extensions/telegram/allowed-updates-*.js

Root cause

extensions/telegram/package.json declares "grammy": "^1.42.0", but the version actually present at install time is 1.41.1. scripts/stage-bundled-plugin-runtime-deps.mjs calls dependencyVersionSatisfied(spec, installedVersion) before staging — the ^1.42.0 range is not satisfied by 1.41.1, so grammy is silently skipped and never copied into dist/extensions/telegram/node_modules/. At runtime the telegram extension fails to require it.

Fix

Change the spec to ^1.41.0 so it matches the installed version. One-line, single-file diff. Verified locally — gateway boots clean and Telegram channel comes up.

Why a separate PR

PR #70091 already proposes the same one-line change but bundles 9 unrelated cherry-picks (~595 additions across 21 files) plus two open Greptile review findings, which will slow it down. This regression is breaking every install on v2026.4.21, so a minimal targeted fix seems worth the duplication. Happy to close this if #70091's grammy commit can be cherry-picked separately.

Changed files

  • extensions/telegram/package.json (modified, +1/-1)

Code Example

Failed to read config at /home/scotter/.openclaw/openclaw.json Error: Cannot find module 'grammy'
Require stack:
- /home/scotter/.local/share/pnpm/global/5/.pnpm/openclaw@2026.4.21_@napi-rs+canvas@0.1.97/node_modules/openclaw/dist/extensions/telegram/allowed-updates-BD2bJyzD.js
    at Function._resolveFilename (node:internal/modules/cjs/loader:1383:15)
    at Function.resolve (node:internal/modules/helpers:157:19)
    at jitiResolve (/home/scotter/.local/share/pnpm/global/5/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.cjs:1:148703)
    at jitiRequire (/home/scotter/.local/share/pnpm/global/5/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.cjs:1:150290)
    at /home/scotter/.local/share/pnpm/global/5/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.cjs:1:157987
    at /home/scotter/.local/share/pnpm/global/5/.pnpm/openclaw@2026.4.21_@napi-rs+canvas@0.1.97/node_modules/openclaw/dist/extensions/telegram/allowed-updates-BD2bJyzD.js:1:245
    at eval_evalModule (/home/scotter/.local/share/pnpm/global/5/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.cjs:1:155533)
    at jitiRequire (/home/scotter/.local/share/pnpm/global/5/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.cjs:1:150967)
    at /home/scotter/.local/share/pnpm/global/5/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.cjs:1:157987
    at /home/scotter/.local/share/pnpm/global/5/.pnpm/openclaw@2026.4.21_@napi-rs+canvas@0.1.97/node_modules/openclaw/dist/extensions/telegram/probe-CMHHfwas.js:6:31 {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]_@[email protected]/node_modules/openclaw/dist/extensions/telegram/allowed-updates-BD2bJyzD.js'
  ]
}

Invalid config:
- <root>: read failed: Error: Cannot find module 'grammy'
Require stack:
- /home/scotter/.local/share/pnpm/global/5/.pnpm/openclaw@2026.4.21_@napi-rs+canvas@0.1.97/node_modules/openclaw/dist/extensions/telegram/allowed-updates-BD2bJyzD.js

---
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

After installing the 2026.4.21 update, gateway won't come up. Doctor after doctor --fix says:

Failed to read config at /home/scotter/.openclaw/openclaw.json Error: Cannot find module 'grammy'
Require stack:
- /home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]_@[email protected]/node_modules/openclaw/dist/extensions/telegram/allowed-updates-BD2bJyzD.js
    at Function._resolveFilename (node:internal/modules/cjs/loader:1383:15)
    at Function.resolve (node:internal/modules/helpers:157:19)
    at jitiResolve (/home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]/node_modules/jiti/dist/jiti.cjs:1:148703)
    at jitiRequire (/home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]/node_modules/jiti/dist/jiti.cjs:1:150290)
    at /home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]/node_modules/jiti/dist/jiti.cjs:1:157987
    at /home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]_@[email protected]/node_modules/openclaw/dist/extensions/telegram/allowed-updates-BD2bJyzD.js:1:245
    at eval_evalModule (/home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]/node_modules/jiti/dist/jiti.cjs:1:155533)
    at jitiRequire (/home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]/node_modules/jiti/dist/jiti.cjs:1:150967)
    at /home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]/node_modules/jiti/dist/jiti.cjs:1:157987
    at /home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]_@[email protected]/node_modules/openclaw/dist/extensions/telegram/probe-CMHHfwas.js:6:31 {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]_@[email protected]/node_modules/openclaw/dist/extensions/telegram/allowed-updates-BD2bJyzD.js'
  ]
}

Invalid config:
- <root>: read failed: Error: Cannot find module 'grammy'
Require stack:
- /home/scotter/.local/share/pnpm/global/5/.pnpm/[email protected]_@[email protected]/node_modules/openclaw/dist/extensions/telegram/allowed-updates-BD2bJyzD.js

Steps to reproduce

See summary.

Expected behavior

See summary.

Actual behavior

See summary.

OpenClaw version

2026.4.21

Operating system

Linux Mint, latest

Install method

bash openclaw update

Model

gpt 5.4

Provider / routing chain

openrouter

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

No response

Additional information

No response

extent analysis

TL;DR

The issue is likely due to a missing 'grammy' module, which is required by the OpenClaw extension, and can be fixed by installing the required dependency.

Guidance

  • The error message indicates that the 'grammy' module is not found, which is required by the OpenClaw extension. This suggests that the module is not installed or not properly linked.
  • To verify the issue, check the node_modules directory to see if the 'grammy' module is present. If not, try installing it using the package manager.
  • Try running pnpm install grammy or npm install grammy to install the missing module.
  • If the issue persists, check the openclaw.json configuration file to ensure that the 'grammy' module is properly configured and referenced.

Example

No code snippet is provided as the issue seems to be related to a missing dependency rather than a code error.

Notes

The issue might be related to the recent update of OpenClaw to version 2026.4.21, which may have introduced a new dependency on the 'grammy' module. The doctor --fix command was run, but it did not resolve the issue, suggesting that the problem is not with the configuration file itself.

Recommendation

Apply workaround: Install the 'grammy' module using the package manager, as it is likely a required dependency for the OpenClaw extension.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

See summary.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - ✅(Solved) Fix [Bug]: Post 4.21 update; "Cannot find module `grammy`", maybe telegram related. [1 pull requests, 1 comments, 2 participants]