更新后 Matrix 插件缺包排障:定位并补装 @vector-im/matrix-bot-sdk
解决 pnpm 更新后 Matrix 扩展无法加载的问题:通过最小复现、手动补装依赖、重启验证恢复可用。
GITHUBDiscovered 2026-02-14Author @joschuck
Prerequisites
- OpenClaw installed via pnpm and Matrix extension enabled.
- Shell access to the OpenClaw installation directory.
Steps
- Run diagnostics and confirm matrix extension reports missing module @vector-im/matrix-bot-sdk.
- Enter OpenClaw install directory and add the missing package explicitly with pnpm.
- Restart gateway and monitor plugin load logs for matrix initialization success.
- Record environment (OS/Node/pnpm) to help identify recurring binary build failures.
Commands
openclaw doctorcd /opt/homebrew/lib/node_modules/openclaw && pnpm add @vector-im/matrix-bot-sdkopenclaw gateway restartVerify
Matrix plugin loads without 'Cannot find module' and can receive/send a test message.
Caveats
- Issue may stem from native dependency build chain (matrix-sdk-crypto-nodejs) and can reappear after upgrades(需验证).
- Manual patch is a workaround; long-term fix should be upstream post-install checks.
Source attribution
This tip is aggregated from community/public sources and preserved with attribution.
Open original source ↗