bot无法正常启动

2025-10-07 13:52:54 [E] app TypeError: Cannot read properties of undefined (reading ‘name’)
at CommandManager.ensure (D:\Koishi-Bot\node_modules@koishijs\plugin-commands\lib\index.js:168:45)
at CommandManager.accept (D:\Koishi-Bot\node_modules@koishijs\plugin-commands\lib\index.js:268:10)
at D:\Koishi-Bot\node_modules@koishijs\plugin-commands\lib\index.js:163:12
at Object.apply (D:\Koishi-Bot\node_modules@cordisjs\core\lib\index.cjs:171:28)
at Timeout. (D:\Koishi-Bot\node_modules@cordisjs\timer\lib\index.cjs:42:9)
at listOnTimeout (node:internal/timers:588:17)
at process.processTimers (node:internal/timers:523:7)

你可以先关闭 @koishijs/plugin-commands 插件

或者直接先 yarn remove 卸载掉这个插件

然后再开启koishi。


然后立即进入你的blockly插件编辑页面

查看你编写的程序是否有误。

或者检查是否有其他插件指令重复、未注册指令等错误

恢复后记得开启/安装 @koishijs/plugin-commands 插件




如果你确定是由于你写的blockly程序导致的问题,

那也可以在不启动koishi的情况下,恢复此情况。

可以参考此解决方法