yarn create koishi无法使用


2024-01-27 11:20:24 [I] assets missing config “selfUrl”, fallback to “file:” scheme
2024-01-27 11:20:24 [E] app TypeError: Invalid URL
at new URL (node:internal/url:775:36)
at new NodeConsole (C:\date\koishi-chat\node_modules@koishijs\plugin-console\lib\node\index.js:76:168)
at _MainScope.apply (C:\date\koishi-chat\node_modules\cordis\lib\index.cjs:536:24)
at C:\date\koishi-chat\node_modules\cordis\lib\index.cjs:558:36
at _MainScope.ensure (C:\date\koishi-chat\node_modules\cordis\lib\index.cjs:311:18)
at _MainScope.start (C:\date\koishi-chat\node_modules\cordis\lib\index.cjs:558:12)
at _MainScope.init (C:\date\koishi-chat\node_modules\cordis\lib\index.cjs:358:12)
at new MainScope (C:\date\koishi-chat\node_modules\cordis\lib\index.cjs:486:12)
at Proxy.plugin (C:\date\koishi-chat\node_modules\cordis\lib\index.cjs:671:15)
at Proxy.forkPlugin (C:\date\koishi-chat\node_modules@koishijs\loader\lib\shared.js:285:19)
2024-01-27 11:20:24 [I] server server listening at http://127.0.0.1:5300
2024-01-27 11:20:24 [I] console webui is available at http://127.0.0.1:5300

TypeError [ERR_INVALID_ARG_TYPE]: The “paths[0]” argument must be of type string. Received undefined
at validateString (node:internal/validators:162:11)
at resolve (node:path:171:9)
at C:\date\koishi-chat\node_modules@koishijs\plugin-console\lib\node\index.js:184:48
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async bodyParser (C:\date\koishi-chat\node_modules\koa-bodyparser\index.js:78:5)

TypeError [ERR_INVALID_ARG_TYPE]: The “paths[0]” argument must be of type string. Received undefined
at validateString (node:internal/validators:162:11)
at resolve (node:path:171:9)
at C:\date\koishi-chat\node_modules@koishijs\plugin-console\lib\node\index.js:184:48
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async bodyParser (C:\date\koishi-chat\node_modules\koa-bodyparser\index.js:78:5)

没更改端口也不能用

npm init koishi@latest

也是一样的

2 个赞
PS C:\Users\5800h\Desktop\work\temp> yarn create koishi
yarn create v1.22.21
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...

success Installed "create-koishi@6.2.0" with binaries:
      - create-koishi
[##########################] 26/26
  Create Koishi  v6.2.0

√ Project name: ... koishi-app
  Scaffolding project in koishi-app ...
  Done.

√ Initialize Git for version control? ... yes
  Done.

√ Install and start it now? ... yes
➤ YN0088: A new stable version of Yarn is available: 4.0.2!
➤ YN0088: Upgrade now by running yarn set version 4.0.2

➤ YN0000: · Yarn 4.0.1
➤ YN0000: ┌ Resolution step
➤ YN0085: │ + @koishijs/client@npm:5.26.3, @koishijs/plugin-actions@npm:0.0.2, and 621 more.
➤ YN0000: └ Completed in 2s 661ms
➤ YN0000: ┌ Fetch step
➤ YN0013: │ 85 packages were added to the project (+ 32.72 MiB).
➤ YN0000: └ Completed in 1s 155ms
➤ YN0000: ┌ Link step
➤ YN0007: │ esbuild@npm:0.18.20 must be built because it never has been before or the last one failed
➤ YN0007: │ vue-demi@npm:0.14.6 [571a2] must be built because it never has been before or the last one failed
➤ YN0000: └ Completed in 4s 824ms
➤ YN0000: · Done in 8s 743ms
2024-01-27 11:25:44 [I] app Koishi/4.16.7
2024-01-27 11:25:44 [I] loader apply plugin group:entry
2024-01-27 11:25:44 [I] loader apply plugin group:server
2024-01-27 11:25:44 [I] loader apply plugin server:aglt1h
2024-01-27 11:25:44 [I] loader apply plugin group:basic
2024-01-27 11:25:44 [I] loader apply plugin commands:7x949q
2024-01-27 11:25:44 [I] loader apply plugin help:x2bl8m
2024-01-27 11:25:44 [I] loader apply plugin locales:ie5gew
2024-01-27 11:25:44 [I] loader apply plugin rate-limit:6ja8sq
2024-01-27 11:25:44 [I] loader apply plugin telemetry:bzyzf5
2024-01-27 11:25:44 [I] loader apply plugin group:console
2024-01-27 11:25:44 [I] loader apply plugin actions:fioz9x
2024-01-27 11:25:44 [I] loader apply plugin analytics:7evdi7
2024-01-27 11:25:44 [I] loader apply plugin config:am7nym
2024-01-27 11:25:44 [I] loader apply plugin console:kexk07
2024-01-27 11:25:44 [I] loader apply plugin dataview:yq1dng
2024-01-27 11:25:44 [I] loader apply plugin explorer:kdpzcl
2024-01-27 11:25:44 [I] loader apply plugin logger:qnlqde
2024-01-27 11:25:44 [I] loader apply plugin insight:opant7
2024-01-27 11:25:44 [I] loader apply plugin market:1gnll4
2024-01-27 11:25:44 [I] loader apply plugin notifier:cx4ea3
2024-01-27 11:25:44 [I] loader apply plugin oobe:f2zjcf
2024-01-27 11:25:44 [I] loader apply plugin sandbox:k7heby
2024-01-27 11:25:44 [I] loader apply plugin status:bqsu5w
2024-01-27 11:25:44 [I] loader apply plugin theme-vanilla:xyy5nk
2024-01-27 11:25:44 [I] loader apply plugin group:storage
2024-01-27 11:25:44 [I] loader apply plugin database-sqlite:qfqx0l
2024-01-27 11:25:44 [I] loader apply plugin assets-local:ma8azt
2024-01-27 11:25:44 [I] loader apply plugin group:adapter
2024-01-27 11:25:44 [I] assets missing config "selfUrl", fallback to "file:" scheme
2024-01-27 11:25:44 [E] app TypeError: Invalid URL
                            at new URL (node:internal/url:775:36)
                            at new NodeConsole (C:\Users\5800h\Desktop\work\temp\koishi-app\node_modules\@koishijs\plugin-console\lib\node\index.js:76:168)
                            at _MainScope.apply (C:\Users\5800h\Desktop\work\temp\koishi-app\node_modules\cordis\lib\index.cjs:536:24)
                            at C:\Users\5800h\Desktop\work\temp\koishi-app\node_modules\cordis\lib\index.cjs:558:36
                            at _MainScope.ensure (C:\Users\5800h\Desktop\work\temp\koishi-app\node_modules\cordis\lib\index.cjs:311:18)
                            at _MainScope.start (C:\Users\5800h\Desktop\work\temp\koishi-app\node_modules\cordis\lib\index.cjs:558:12)
                            at _MainScope.init (C:\Users\5800h\Desktop\work\temp\koishi-app\node_modules\cordis\lib\index.cjs:358:12)
                            at new MainScope (C:\Users\5800h\Desktop\work\temp\koishi-app\node_modules\cordis\lib\index.cjs:486:12)
                            at Proxy.plugin (C:\Users\5800h\Desktop\work\temp\koishi-app\node_modules\cordis\lib\index.cjs:671:15)
                            at Proxy.forkPlugin (C:\Users\5800h\Desktop\work\temp\koishi-app\node_modules\@koishijs\loader\lib\shared.js:285:19)
2024-01-27 11:25:44 [I] server server listening at http://127.0.0.1:5140
2024-01-27 11:25:44 [I] console webui is available at http://127.0.0.1:5140
2024-01-27 11:25:44 [I] sqlite auto creating table user
2024-01-27 11:25:44 [I] sqlite auto creating table binding
2024-01-27 11:25:44 [I] sqlite auto creating table channel

  TypeError [ERR_INVALID_ARG_TYPE]: The "paths[0]" argument must be of type string. Received undefined
      at validateString (node:internal/validators:162:11)
      at resolve (node:path:171:9)
      at C:\Users\5800h\Desktop\work\temp\koishi-app\node_modules\@koishijs\plugin-console\lib\node\index.js:184:48
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async bodyParser (C:\Users\5800h\Desktop\work\temp\koishi-app\node_modules\koa-bodyparser\index.js:78:5)


  TypeError [ERR_INVALID_ARG_TYPE]: The "paths[0]" argument must be of type string. Received undefined
      at validateString (node:internal/validators:162:11)
      at resolve (node:path:171:9)
      at C:\Users\5800h\Desktop\work\temp\koishi-app\node_modules\@koishijs\plugin-console\lib\node\index.js:184:48
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async bodyParser (C:\Users\5800h\Desktop\work\temp\koishi-app\node_modules\koa-bodyparser\index.js:78:5)


已复现

3 个赞

已知问题,应来自 console,等待shigma修复

4 个赞

应该可以回退 console5.26.1(我还回退koishi至 4.16.6)暂时解决
(无法进入依赖管理可以尝试修改koishi实例中 package.json :
搜索console,修改冒号后版本号,
修改后删除(?或重命名) yarn.lock,并创建同名空文件,
执行 yarn(脚手架) 或 koi yarn -n default(Koishi Desktop)
(虽然我不知道会不会导致308))

5 个赞

Shigma已修复!
如果已经炸了,用我上面的方法修改版本到 5.26.4
没炸要注意更新到 5.26.4 以上

5 个赞

不会,可以在任意地方使用此方法,同时保持客服支持

3 个赞

额,我指的是手动修改package.json

4 个赞

是的,仅在解决此问题(console 5.26.2/3)时,手动修改 package.json 不会丢失用户群客服支持

3 个赞