#Cannot find module 'grammy'

1 messages · Page 1 of 1 (latest)

forest mirage
#

~ % openclaw update
Updating OpenClaw...


◇ ✓ Updating via package manager (137.82s)

◇ ✗ Running doctor checks (47.96s)
Error: Cannot find module 'grammy'
Require stack:
- /Users/<user name>/.npm-global/lib/node_modules/openclaw/dist/extensions/telegram/allowed-updates-BD2bJyzD.js

Update Result: ERROR
Root: /Users/<user name>/.npm-global/lib/node_modules/openclaw
Reason: openclaw doctor
Before: 2026.4.14
After: 2026.4.20

Total time: 188.97s

steep pollenBOT
eternal cypressBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

forest mirage
#

I tried updating via "openclaw update" command. it failed with message Error: Cannot find module 'grammy'
Require stack:

/Users/<user name>/.npm-global/lib/node_modules/openclaw/dist/extensions/telegram/allowed-updates-BD2bJyzD.js
when trying to run doctor after the update.

karmic quailBOT
#

I found grammy is definitely supposed to be a normal runtime dependency in current source, so this smells like a packaging issue in that particular published build, not something you did wrong. I’m checking the safest workaround now.

#

This looks like a bad 2026.4.20 package publish, not your config.

I checked the published npm package, and 2026.4.20 is missing these Telegram runtime deps:

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

That’s why openclaw doctor blows up when it touches the Telegram checks.

First, can you paste:

openclaw --version

If it says 2026.4.20, I’d recommend rolling back to 2026.4.14 for now.

#

If you installed with pnpm:

pnpm add -g openclaw@2026.4.14
openclaw doctor

If you installed with npm:

npm install -g openclaw@2026.4.14
openclaw doctor

Temporary hack, if you want to stay on 2026.4.20:

forest mirage
#

If this si true, can you file the bug report

karmic quailBOT
#

Yeah, this looks real.

I can’t open GitHub issues on your behalf from here, but this is a good one to file at:

https://github.com/openclaw/openclaw/issues

You can pretty much paste this:

Title
2026.4.20 package install is missing grammy deps, causing openclaw update/doctor to fail

Body

## Summary

Updating OpenClaw from `2026.4.14` to `2026.4.20` via `openclaw update` fails during the doctor step with:
#

Error: Cannot find module 'grammy'

Require stack:
- /Users/<user name>/.npm-global/lib/node_modules/openclaw/dist/extensions/telegram/allowed-updates-BD2bJyzD.js

## Repro

1. Start on `2026.4.14`
2. Run:

   openclaw update

3. Update completes package-manager install, then fails during doctor
#
## Actual result

`openclaw doctor` crashes with missing module `grammy`

## Expected result

Update should complete successfully and doctor should run without missing runtime deps

## Environment

- OpenClaw before update: `2026.4.14`
- OpenClaw after update attempt: `2026.4.20`
- Install root: `/Users/<user name>/.npm-global/lib/node_modules/openclaw`
- OS: macOS
- Install method: global package install
#

## Notes

This appears to be a packaging regression in the published package:

- `openclaw@2026.4.20` is missing:
  - `grammy`
  - `@grammyjs/runner`
  - `@grammyjs/transformer-throttler`
- `openclaw@2026.4.14` includes them
- current source `package.json` still declares them as dependencies

I also checked that `2026.4.20-beta.2` appears to have the same missing deps.

If you want, paste the issue here before submitting and I’ll sanity-check it.

forest mirage
karmic quailBOT
#

Nice, yep, that sounds like the right bug. 🎯

I’d add your exact update output there, especially:

  • started on 2026.4.14
  • openclaw update moved you to 2026.4.20
  • failure happens in the doctor step
  • missing module is grammy
  • install root is under ~/.npm-global/lib/node_modules/openclaw

For now, I’d avoid 2026.4.20 and roll back to 2026.4.14 until there’s a patched release.

If you want the quick path:

openclaw --version
#
npm install -g openclaw@2026.4.14
openclaw doctor

Or with pnpm if that’s how you installed it:

pnpm add -g openclaw@2026.4.14
openclaw doctor

If that gets you unstuck, please drop a comment on the issue saying rollback fixed it. That helps confirm the regression boundary.

forest mirage
#

rollback restored service. workaround completed for now