koishijs / koishi

Cross-platform chatbot framework made with love
https://koishi.chat
MIT License
4.5k stars 247 forks source link

Bug: 按教程安完了start #695

Closed Petalses closed 2 years ago

Petalses commented 2 years ago

Describe the bug

2022-05-26 01:04:04 [I] app Koishi/4.7.1 2022-05-26 01:04:04 [E] app TypeError: this.caller.lifecycle.checkLength is not a function at Internal.middleware (C:\Users\Administrator\koishi-v4-test1\node_modules\@koishijs\core\l ib\node.js:2038:27) at new Internal (C:\Users\Administrator\koishi-v4-test1\node_modules\@koishijs\core\lib\node .js:2020:10) at new App (C:\Users\Administrator\koishi-v4-test1\node_modules\cordis\lib\index.cjs:489:19)

                       at Loader.createApp (C:\Users\Administrator\koishi-v4-test1\node_modules\@koishijs\cli\lib\w

orker\index.js:284:29) at Object. (C:\Users\Administrator\koishi-v4-test1\node_modules\@koishijs\cli\lib \worker\index.js:595:18) at Module._compile (node:internal/modules/cjs/loader:1105:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. PS C:\Users\Administrator\koishi-v4-test1> yarn

Steps to reproduce

yarn create koishi yarn yarn start

Expected behavior

1

Screenshots

![Uploading N19S2@L8Y12TE}OLYYK5C.png…]()

Versions

Additional context

No response

shigma commented 2 years ago

非常抱歉!我今天下午疏忽推了一个不兼容的版本导致了你的问题。

你可以使用以下方式解决:

  1. 进入你生成的目录
  2. 打开 package.json 并添加以下内容:
  },
+ "resolutions": {
+   "cordis": "~1.1.0"
+ },
  "yakumo": {
  1. 打开命令行并输入 yarn
  2. 运行完成后再次 yarn start 启动。

如果仍有问题可以继续回复或者加群解决,群号在 readme 底部和文档右上角。

shigma commented 2 years ago

此外,Koishi 4.7.2 版本将解决这个问题。新版本发布时我会在这个 issue 通知。届时即可删掉这三行内容。

shigma commented 2 years ago

更新:现在删除 node_modules, package-lock.json 和 yarn.lock 并重新安装也可以解决此问题。