微信clawbot龙虾插件安装踩雷及解决办法
踩雷1:更新openclaw,导致插件入口消失
npm update -g openclaw
先更新了openclaw(不要更新到最新版,如果你已经更新了看后文)
使用代码:
npm update -g openclaw
更新之后
报错,提示插件找不到
14:31:51 [plugins] openclaw-weixin failed to load from C:\Users\wangyh\.openclaw\extensions\openclaw-weixin\index.ts: Error: Cannot find module 'openclaw/plugin-sdk'Require stack:
打开更新日志
https://github.com/openclaw/openclaw/releases
细看更新日志,其中一段如下:
Plugins/bundled runtimes: ship bundled plugin runtime sidecars like WhatsApp `light-runtime-api.js`, Matrix `runtime-api.js`, and other plugin runtime entry files in the npm package again, so global installs stop failing on missing bundled plugin runtime surfaces.
意思是,公开的插件 SDK 入口改为 openclaw/plugin-sdk/*;openclaw/extension-api 已删除且无兼容层;并写明直连导入应来自 openclaw/plugin-sdk/* 的子路径,而不是原来的「整块」根路径。
而微信插件还是老版本的用法,自然行不通。
解决办法:
参考网站:https://www.clawfather.cn/install/updating/
安装已知良好的版本(将 <version> 替换为最后可用的版本):
Terminal window
npm i -g openclaw@<version>
Terminal window
pnpm add -g openclaw@<version>
提示:要查看当前发布的版本,运行 npm view openclaw version。
然后重启 + 重新运行 doctor:
Terminal window
openclaw doctoropenclaw gateway restart
夜雨聆风