fix: add npm overrides for keyv resolution (#162)

* fix: telegram ESM compatibility and improved diagnostics

- Replace telegram-markdown-v2 with telegramify-markdown (ESM compatible)
- Add raw text fallback when Telegram formatting fails, with error notice
- Improve empty response diagnostics: log agent ID, show conversation ID
- Add reset-conversation command hint to user messages
- Add telegram-format.test.ts with 7 tests

Fixes Railway deployment ERR_REQUIRE_ESM error with remark package.

Written by Cameron and Letta Code

"The best error message is the one that never shows up." - Thomas Fuchs

* fix: add npm overrides for keyv resolution

Users were still hitting ERR_MODULE_NOT_FOUND for keyv even after
PR #154 added it as a direct dependency. This happens because npm's
hoisting doesn't always resolve peer deps of optional deps properly.

npm overrides force the package manager to use our root keyv version
for all nested references, which is the idiomatic solution for
transitive peer dependency issues.

Also adds troubleshooting entry to README.

Written by Cameron ◯ Letta Code

"The best error message is the one that never shows up."
- Thomas Fuchs
This commit is contained in:
Cameron
2026-02-06 10:25:30 -08:00
committed by GitHub
parent 49db36f52f
commit 2373dbb3b1
2 changed files with 12 additions and 0 deletions

View File

@@ -304,6 +304,15 @@ See all releases: [GitHub Releases](https://github.com/letta-ai/lettabot/release
### WhatsApp
**Cannot find package 'keyv'**
```
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'keyv'
```
Clean reinstall fixes this:
```bash
rm -rf node_modules package-lock.json && npm install
```
**Session errors / "Bad MAC" messages**
These are normal Signal Protocol renegotiation messages. They're noisy but harmless.

View File

@@ -71,5 +71,8 @@
"devDependencies": {
"@types/update-notifier": "^6.0.8",
"vitest": "^4.0.18"
},
"overrides": {
"keyv": "$keyv"
}
}