bot无法正常启动

终端里npm start后一直在以下过程里循环,无法正常启动,这啥原因help
2025-10-07 13:52:42 [I] app Koishi/4.18.9
2025-10-07 13:52:43 [I] loader apply plugin group:entry
2025-10-07 13:52:43 [I] loader apply plugin group:server
2025-10-07 13:52:43 [I] loader apply plugin server:gicn78
2025-10-07 13:52:43 [I] loader apply plugin group:basic
2025-10-07 13:52:43 [I] loader apply plugin admin:h89aj9
2025-10-07 13:52:43 [I] loader apply plugin commands:wt058e
2025-10-07 13:52:43 [I] loader apply plugin help:q3d060
2025-10-07 13:52:43 [I] loader apply plugin http:e3bw0q
2025-10-07 13:52:43 [I] loader apply plugin inspect:xf3s90
2025-10-07 13:52:43 [I] loader apply plugin locales:gb9h0m
2025-10-07 13:52:43 [I] loader apply plugin proxy-agent:k3te1h
2025-10-07 13:52:43 [I] loader apply plugin rate-limit:u8hsx3
2025-10-07 13:52:43 [I] loader apply plugin group:console
2025-10-07 13:52:43 [I] loader apply plugin actions:tr9ykt
2025-10-07 13:52:43 [I] loader apply plugin analytics:b1ej95
2025-10-07 13:52:43 [I] loader apply plugin auth:kzo5p7
2025-10-07 13:52:43 [I] loader apply plugin config:4cd9x5
2025-10-07 13:52:43 [I] loader apply plugin console:lwxg7o
2025-10-07 13:52:43 [I] loader apply plugin dataview:zoogjo
2025-10-07 13:52:43 [I] loader apply plugin explorer:n7ljcq
2025-10-07 13:52:43 [I] loader apply plugin logger:mqhvlx
2025-10-07 13:52:43 [I] loader apply plugin insight:ievy2d
2025-10-07 13:52:43 [I] loader apply plugin market:mj9ijt
2025-10-07 13:52:43 [I] loader apply plugin notifier:3j0ubj
2025-10-07 13:52:43 [I] loader apply plugin oobe:fqqre4
2025-10-07 13:52:43 [I] loader apply plugin sandbox:pazodi
2025-10-07 13:52:43 [I] loader apply plugin status:flpwtk
2025-10-07 13:52:43 [I] loader apply plugin theme-vanilla:y77giy
2025-10-07 13:52:43 [I] loader apply plugin group:storage
2025-10-07 13:52:43 [I] loader apply plugin database-sqlite:sdiz4o
2025-10-07 13:52:43 [I] loader apply plugin assets-local:7i58rm
2025-10-07 13:52:43 [I] loader apply plugin adapter-onebot:witkwj
2025-10-07 13:52:43 [I] loader apply plugin @yyyhf/jrrp:9z75dk
2025-10-07 13:52:43 [I] loader apply plugin asaka-fortune:al7dw1
2025-10-07 13:52:43 [I] loader apply plugin wordle-game:zahdi7
2025-10-07 13:52:43 [I] loader apply plugin monetary:1r85b1
2025-10-07 13:52:43 [I] loader apply plugin puppeteer:sxg2ef
2025-10-07 13:52:44 [I] loader apply plugin markdown-to-image-service:em60s8
2025-10-07 13:52:44 [I] loader apply plugin command-creater:kosd3g
2025-10-07 13:52:44 [I] loader apply plugin anti-space:f0yzkz
2025-10-07 13:52:44 [I] loader apply plugin advanced-echo:hcuii8
2025-10-07 13:52:44 [I] loader apply plugin help-pro:2kgvb5
2025-10-07 13:52:44 [I] loader apply plugin blockly-null:o7uy6a
2025-10-07 13:52:44 [I] assets missing config “selfUrl”, fallback to “file:” scheme
2025-10-07 13:52:44 [I] puppeteer chrome executable found at C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe
2025-10-07 13:52:44 [I] server server listening at http://127.0.0.1:5140
2025-10-07 13:52:44 [I] console webui is available at -
2025-10-07 13:52:45 [I] auth creating admin account
2025-10-07 13:52:46 [I] blockly Loading 6 plugin(s)
2025-10-07 13:52:46 [I] blockly Loaded 6 plugin(s)
2025-10-07 13:52:46 [E] app ReferenceError: session is not defined
at Object.apply (eval at (D:\Koishi-Bot\node_modules\koishi-plugin-blockly-null\lib\index.js:319:32), :283:3)
at MainScope.apply (D:\Koishi-Bot\node_modules@cordisjs\core\lib\index.cjs:876:26)
at D:\Koishi-Bot\node_modules@cordisjs\core\lib\index.cjs:900:49
at MainScope.ensure (D:\Koishi-Bot\node_modules@cordisjs\core\lib\index.cjs:686:18)
at MainScope.start (D:\Koishi-Bot\node_modules@cordisjs\core\lib\index.cjs:900:12)
at MainScope.init (D:\Koishi-Bot\node_modules@cordisjs\core\lib\index.cjs:719:12)
at new MainScope (D:\Koishi-Bot\node_modules@cordisjs\core\lib\index.cjs:835:12)
at Proxy.plugin (D:\Koishi-Bot\node_modules@cordisjs\core\lib\index.cjs:1062:15)
at D:\Koishi-Bot\node_modules\koishi-plugin-blockly-null\lib\index.js:326:43
at Array.forEach ()
2025-10-07 13:52:46 [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)
2025-10-07 13:52:47 [I] app Koishi/4.18.9
2025-10-07 13:52:47 [I] loader apply plugin group:entry
2025-10-07 13:52:47 [I] loader apply plugin group:server
2025-10-07 13:52:47 [I] loader apply plugin server:gicn78
2025-10-07 13:52:47 [I] loader apply plugin group:basic
2025-10-07 13:52:47 [I] loader apply plugin admin:h89aj9
2025-10-07 13:52:47 [I] loader apply plugin commands:wt058e
2025-10-07 13:52:47 [I] loader apply plugin help:q3d060
2025-10-07 13:52:47 [I] loader apply plugin http:e3bw0q
2025-10-07 13:52:47 [I] loader apply plugin inspect:xf3s90
2025-10-07 13:52:47 [I] loader apply plugin locales:gb9h0m
2025-10-07 13:52:47 [I] loader apply plugin proxy-agent:k3te1h
2025-10-07 13:52:47 [I] loader apply plugin rate-limit:u8hsx3
2025-10-07 13:52:47 [I] loader apply plugin group:console
2025-10-07 13:52:47 [I] loader apply plugin actions:tr9ykt
2025-10-07 13:52:47 [I] loader apply plugin analytics:b1ej95
2025-10-07 13:52:47 [I] loader apply plugin auth:kzo5p7
2025-10-07 13:52:47 [I] loader apply plugin config:4cd9x5
2025-10-07 13:52:47 [I] loader apply plugin console:lwxg7o
2025-10-07 13:52:47 [I] loader apply plugin dataview:zoogjo
2025-10-07 13:52:47 [I] loader apply plugin explorer:n7ljcq
2025-10-07 13:52:47 [I] loader apply plugin logger:mqhvlx
2025-10-07 13:52:47 [I] loader apply plugin insight:ievy2d
2025-10-07 13:52:47 [I] loader apply plugin market:mj9ijt
2025-10-07 13:52:47 [I] loader apply plugin notifier:3j0ubj
2025-10-07 13:52:47 [I] loader apply plugin oobe:fqqre4
2025-10-07 13:52:47 [I] loader apply plugin sandbox:pazodi
2025-10-07 13:52:47 [I] loader apply plugin status:flpwtk
2025-10-07 13:52:47 [I] loader apply plugin theme-vanilla:y77giy
2025-10-07 13:52:47 [I] loader apply plugin group:storage
2025-10-07 13:52:47 [I] loader apply plugin database-sqlite:sdiz4o
2025-10-07 13:52:47 [I] loader apply plugin assets-local:7i58rm
2025-10-07 13:52:47 [I] loader apply plugin adapter-onebot:witkwj
2025-10-07 13:52:47 [I] loader apply plugin @yyyhf/jrrp:9z75dk
2025-10-07 13:52:47 [I] loader apply plugin asaka-fortune:al7dw1
2025-10-07 13:52:47 [I] loader apply plugin wordle-game:zahdi7
2025-10-07 13:52:48 [I] loader apply plugin monetary:1r85b1
2025-10-07 13:52:48 [I] loader apply plugin puppeteer:sxg2ef
2025-10-07 13:52:48 [I] loader apply plugin markdown-to-image-service:em60s8
2025-10-07 13:52:48 [I] loader apply plugin command-creater:kosd3g
2025-10-07 13:52:48 [I] loader apply plugin anti-space:f0yzkz
2025-10-07 13:52:48 [I] loader apply plugin advanced-echo:hcuii8
2025-10-07 13:52:48 [I] loader apply plugin help-pro:2kgvb5
2025-10-07 13:52:48 [I] loader apply plugin blockly-null:o7uy6a
2025-10-07 13:52:48 [I] assets missing config “selfUrl”, fallback to “file:” scheme
2025-10-07 13:52:48 [I] puppeteer chrome executable found at C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe
2025-10-07 13:52:48 [I] server server listening at -
2025-10-07 13:52:48 [I] console webui is available at -
2025-10-07 13:52:49 [I] auth creating admin account
2025-10-07 13:52:49 [I] blockly Loading 6 plugin(s)
2025-10-07 13:52:50 [I] blockly Loaded 6 plugin(s)
2025-10-07 13:52:50 [E] app ReferenceError: session is not defined
at Object.apply (eval at (D:\Koishi-Bot\node_modules\koishi-plugin-blockly-null\lib\index.js:319:32), :283:3)
at MainScope.apply (D:\Koishi-Bot\node_modules@cordisjs\core\lib\index.cjs:876:26)
at D:\Koishi-Bot\node_modules@cordisjs\core\lib\index.cjs:900:49
at MainScope.ensure (D:\Koishi-Bot\node_modules@cordisjs\core\lib\index.cjs:686:18)
at MainScope.start (D:\Koishi-Bot\node_modules@cordisjs\core\lib\index.cjs:900:12)
at MainScope.init (D:\Koishi-Bot\node_modules@cordisjs\core\lib\index.cjs:719:12)
at new MainScope (D:\Koishi-Bot\node_modules@cordisjs\core\lib\index.cjs:835:12)
at Proxy.plugin (D:\Koishi-Bot\node_modules@cordisjs\core\lib\index.cjs:1062:15)
at D:\Koishi-Bot\node_modules\koishi-plugin-blockly-null\lib\index.js:326:43
at Array.forEach ()
2025-10-07 13:52:50 [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)
2025-10-07 13:52:51 [I] app Koishi/4.18.9
2025-10-07 13:52:51 [I] loader apply plugin group:entry
2025-10-07 13:52:51 [I] loader apply plugin group:server
2025-10-07 13:52:51 [I] loader apply plugin server:gicn78
2025-10-07 13:52:51 [I] loader apply plugin group:basic
2025-10-07 13:52:51 [I] loader apply plugin admin:h89aj9
2025-10-07 13:52:51 [I] loader apply plugin commands:wt058e
2025-10-07 13:52:51 [I] loader apply plugin help:q3d060
2025-10-07 13:52:51 [I] loader apply plugin http:e3bw0q
2025-10-07 13:52:51 [I] loader apply plugin inspect:xf3s90
2025-10-07 13:52:51 [I] loader apply plugin locales:gb9h0m
2025-10-07 13:52:51 [I] loader apply plugin proxy-agent:k3te1h
2025-10-07 13:52:51 [I] loader apply plugin rate-limit:u8hsx3
2025-10-07 13:52:51 [I] loader apply plugin group:console
2025-10-07 13:52:51 [I] loader apply plugin actions:tr9ykt
2025-10-07 13:52:51 [I] loader apply plugin analytics:b1ej95
2025-10-07 13:52:51 [I] loader apply plugin auth:kzo5p7
2025-10-07 13:52:51 [I] loader apply plugin config:4cd9x5
2025-10-07 13:52:51 [I] loader apply plugin console:lwxg7o
2025-10-07 13:52:51 [I] loader apply plugin dataview:zoogjo
2025-10-07 13:52:51 [I] loader apply plugin explorer:n7ljcq
2025-10-07 13:52:51 [I] loader apply plugin logger:mqhvlx
2025-10-07 13:52:51 [I] loader apply plugin insight:ievy2d
2025-10-07 13:52:51 [I] loader apply plugin market:mj9ijt
2025-10-07 13:52:51 [I] loader apply plugin notifier:3j0ubj
2025-10-07 13:52:51 [I] loader apply plugin oobe:fqqre4
2025-10-07 13:52:51 [I] loader apply plugin sandbox:pazodi
2025-10-07 13:52:51 [I] loader apply plugin status:flpwtk
2025-10-07 13:52:51 [I] loader apply plugin theme-vanilla:y77giy
2025-10-07 13:52:51 [I] loader apply plugin group:storage
2025-10-07 13:52:51 [I] loader apply plugin database-sqlite:sdiz4o
2025-10-07 13:52:51 [I] loader apply plugin assets-local:7i58rm
2025-10-07 13:52:51 [I] loader apply plugin adapter-onebot:witkwj
2025-10-07 13:52:51 [I] loader apply plugin @yyyhf/jrrp:9z75dk
2025-10-07 13:52:51 [I] loader apply plugin asaka-fortune:al7dw1
2025-10-07 13:52:51 [I] loader apply plugin wordle-game:zahdi7
2025-10-07 13:52:51 [I] loader apply plugin monetary:1r85b1
2025-10-07 13:52:51 [I] loader apply plugin puppeteer:sxg2ef
2025-10-07 13:52:52 [I] loader apply plugin markdown-to-image-service:em60s8
2025-10-07 13:52:52 [I] loader apply plugin command-creater:kosd3g
2025-10-07 13:52:52 [I] loader apply plugin anti-space:f0yzkz
2025-10-07 13:52:52 [I] loader apply plugin advanced-echo:hcuii8
2025-10-07 13:52:52 [I] loader apply plugin help-pro:2kgvb5
2025-10-07 13:52:52 [I] loader apply plugin blockly-null:o7uy6a
2025-10-07 13:52:52 [I] assets missing config “selfUrl”, fallback to “file:” scheme
2025-10-07 13:52:52 [I] puppeteer chrome executable found at C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe
2025-10-07 13:52:52 [I] server server listening at -
2025-10-07 13:52:52 [I] console webui is available at -
2025-10-07 13:52:53 [I] auth creating admin account
2025-10-07 13:52:53 [I] blockly Loading 6 plugin(s)
2025-10-07 13:52:54 [I] blockly Loaded 6 plugin(s)
2025-10-07 13:52:54 [E] app ReferenceError: session is not defined
at Object.apply (eval at (D:\Koishi-Bot\node_modules\koishi-plugin-blockly-null\lib\index.js:319:32), :283:3)
at MainScope.apply (D:\Koishi-Bot\node_modules@cordisjs\core\lib\index.cjs:876:26)
at D:\Koishi-Bot\node_modules@cordisjs\core\lib\index.cjs:900:49
at MainScope.ensure (D:\Koishi-Bot\node_modules@cordisjs\core\lib\index.cjs:686:18)
at MainScope.start (D:\Koishi-Bot\node_modules@cordisjs\core\lib\index.cjs:900:12)
at MainScope.init (D:\Koishi-Bot\node_modules@cordisjs\core\lib\index.cjs:719:12)
at new MainScope (D:\Koishi-Bot\node_modules@cordisjs\core\lib\index.cjs:835:12)
at Proxy.plugin (D:\Koishi-Bot\node_modules@cordisjs\core\lib\index.cjs:1062:15)
at D:\Koishi-Bot\node_modules\koishi-plugin-blockly-null\lib\index.js:326:43
at Array.forEach ()
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)

1 个赞
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的情况下,恢复此情况。

可以参考此解决方法

解决了谢谢

1 个赞