← Back to library

更新后 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
  1. Run diagnostics and confirm matrix extension reports missing module @vector-im/matrix-bot-sdk.
  2. Enter OpenClaw install directory and add the missing package explicitly with pnpm.
  3. Restart gateway and monitor plugin load logs for matrix initialization success.
  4. Record environment (OS/Node/pnpm) to help identify recurring binary build failures.
Commands
openclaw doctor
cd /opt/homebrew/lib/node_modules/openclaw && pnpm add @vector-im/matrix-bot-sdk
openclaw gateway restart
Verify

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 ↗
Visit original post