armbian无法启动koishi

设备:玩客云
系统:armbian(Ubuntu 22.04.1 LTS)
CPU:晶晨S805(armv7)
Linux版本:Linux onecloud 6.1.9-meson #trunk SMP Thu Feb 2 15:42:54 UTC 2023 armv7l armv7l armv7l GNU/Linux

使用模板创建,npm指令
执行npm init koishi后未成功启动,日志如下:

  Create Koishi  v6.2.0

✔ Project name: … koishi-app
  Scaffolding project in koishi-app ...
  Done.

✔ Install and start it now? … yes

added 465 packages in 2m

> koishi-app@0.0.0 start
> koishi start

2023-09-11 12:59:55 [I] app Koishi/4.14.5
2023-09-11 12:59:55 [I] app apply plugin group:entry
2023-09-11 12:59:55 [I] app apply plugin group:basic
2023-09-11 12:59:55 [I] app apply plugin commands
2023-09-11 12:59:56 [I] app apply plugin help
2023-09-11 12:59:56 [I] app apply plugin locales
2023-09-11 12:59:56 [I] app apply plugin rate-limit
2023-09-11 12:59:56 [I] app apply plugin group:console
2023-09-11 12:59:56 [I] app apply plugin analytics
2023-09-11 12:59:56 [I] app apply plugin config
2023-09-11 12:59:56 [I] app apply plugin console
2023-09-11 12:59:56 [I] app apply plugin dataview
2023-09-11 12:59:56 [I] app apply plugin explorer
2023-09-11 12:59:56 [I] app apply plugin logger
2023-09-11 12:59:56 [I] app apply plugin insight
2023-09-11 12:59:56 [I] app apply plugin market
2023-09-11 12:59:56 [I] app apply plugin sandbox
2023-09-11 12:59:56 [I] app apply plugin status
2023-09-11 12:59:57 [I] app apply plugin theme-vanilla
2023-09-11 12:59:57 [I] app apply plugin group:storage
2023-09-11 12:59:57 [I] app apply plugin database-sqlite
2023-09-11 12:59:57 [I] app apply plugin assets-local
2023-09-11 12:59:57 [I] app apply plugin group:adapter
2023-09-11 12:59:57 [I] assets missing config "selfUrl", fallback to "file:" scheme
2023-09-11 12:59:57 [W] app TypeError: Cannot read properties of undefined (reading 'ws')
                            at new NodeConsole (/root/koishi-app/node_modules/@koishijs/plugin-console/lib/node/index.js:63:29)
                            at _MainScope.apply (/root/koishi-app/node_modules/cordis/lib/index.cjs:476:24)
                            at _MainScope.start (/root/koishi-app/node_modules/cordis/lib/index.cjs:498:12)
                            at _MainScope.restart (/root/koishi-app/node_modules/cordis/lib/index.cjs:246:10)
                            at _MainScope.setup (/root/koishi-app/node_modules/cordis/lib/index.cjs:469:10)
                            at new MainScope (/root/koishi-app/node_modules/cordis/lib/index.cjs:428:12)
                            at _Registry.plugin (/root/koishi-app/node_modules/cordis/lib/index.cjs:586:15)
                            at _Context.plugin (/root/koishi-app/node_modules/cordis/lib/index.cjs:650:31)
                            at import_core.Context.plugin (/root/koishi-app/node_modules/koishi/lib/index.cjs:65:17)
                            at _NodeLoader.forkPlugin (/root/koishi-app/node_modules/@koishijs/loader/lib/shared.js:233:19)
2023-09-11 12:59:57 [W] app TypeError: Cannot read properties of undefined (reading 'get')
                            at _NodeConsole.serveAssets (/root/koishi-app/node_modules/@koishijs/plugin-console/lib/node/index.js:110:21)
                            at _NodeConsole.start (/root/koishi-app/node_modules/@koishijs/plugin-console/lib/node/index.js:78:10)
                            at /root/koishi-app/node_modules/cordis/lib/index.cjs:743:18
2023-09-11 12:59:57 [W] app TypeError: Cannot read properties of undefined (reading 'close')
                            at _NodeConsole.stop (/root/koishi-app/node_modules/@koishijs/plugin-console/lib/node/index.js:202:16)
                            at event <dispose> (/root/koishi-app/node_modules/cordis/lib/index.cjs:748:18)
                            at /root/koishi-app/node_modules/cordis/lib/index.cjs:306:7
                            at Array.filter (<anonymous>)
                            at _MainScope.reset (/root/koishi-app/node_modules/cordis/lib/index.cjs:303:51)
                            at _MainScope.reset (/root/koishi-app/node_modules/cordis/lib/index.cjs:489:11)
                            at _MainScope.cancel (/root/koishi-app/node_modules/cordis/lib/index.cjs:281:10)
                            at /root/koishi-app/node_modules/cordis/lib/index.cjs:270:12
                            at async Promise.all (index 31)
                            at async _Lifecycle.flush (/root/koishi-app/node_modules/cordis/lib/index.cjs:82:7)
2023-09-11 12:59:58 [I] sqlite auto creating table user
2023-09-11 12:59:58 [I] sqlite auto creating table binding
2023-09-11 12:59:58 [I] sqlite auto creating table channel

node.js版本为18.17.1

求各位大佬解答 :heart:

2 个赞

这是你在设备上第一次使用 Koishi 吗?

能否提供一下 npm ls koishi 的运行结果?

2 个赞

arm32 有点远古回忆了

1 个赞

是第一次运行,运行结果如下

root@onecloud:~/koishi-app# npm ls koishi
koishi-app@0.0.0 /root/koishi-app
├─┬ @koishijs/plugin-adapter-discord@3.9.3
│ └── koishi@4.14.5 deduped
├─┬ @koishijs/plugin-adapter-kook@3.11.1
│ └── koishi@4.14.5 deduped
├─┬ @koishijs/plugin-adapter-lark@2.1.4
│ └── koishi@4.14.5 deduped
├─┬ @koishijs/plugin-adapter-line@1.2.1
│ └── koishi@4.14.5 deduped
├─┬ @koishijs/plugin-adapter-matrix@3.5.1
│ └── koishi@4.14.5 deduped
├─┬ @koishijs/plugin-adapter-onebot@5.8.1
│ └── koishi@4.14.5 deduped
├─┬ @koishijs/plugin-adapter-telegram@3.9.3
│ └── koishi@4.14.5 deduped
├─┬ @koishijs/plugin-admin@2.0.0-alpha.2
│ └── koishi@4.14.5 deduped
├─┬ @koishijs/plugin-analytics@1.0.5
│ └── koishi@4.14.5 deduped
├─┬ @koishijs/plugin-auth@4.1.2
│ └── koishi@4.14.5 deduped
├─┬ @koishijs/plugin-bind@1.4.3
│ └── koishi@4.14.5 deduped
├─┬ @koishijs/plugin-commands@3.2.4
│ └── koishi@4.14.5 deduped
├─┬ @koishijs/plugin-config@2.3.1
│ └── koishi@4.14.5 deduped
├─┬ @koishijs/plugin-console@5.14.2
│ └── koishi@4.14.5 deduped
├─┬ @koishijs/plugin-database-sqlite@3.6.0
│ └── koishi@4.14.5 deduped
├─┬ @koishijs/plugin-dataview@2.3.1
│ └── koishi@4.14.5 deduped
├─┬ @koishijs/plugin-explorer@1.4.5
│ └── koishi@4.14.5 deduped
├─┬ @koishijs/plugin-help@2.3.2
│ └── koishi@4.14.5 deduped
├─┬ @koishijs/plugin-hmr@1.2.1
│ └── koishi@4.14.5 deduped
├─┬ @koishijs/plugin-insight@3.4.1
│ └── koishi@4.14.5 deduped
├─┬ @koishijs/plugin-inspect@1.1.2
│ └── koishi@4.14.5 deduped
├─┬ @koishijs/plugin-locales@2.4.0
│ └── koishi@4.14.5 deduped
├─┬ @koishijs/plugin-logger@2.3.2
│ └── koishi@4.14.5 deduped
├─┬ @koishijs/plugin-market@2.2.11
│ └── koishi@4.14.5 deduped
├─┬ @koishijs/plugin-sandbox@3.1.13
│ └── koishi@4.14.5 deduped
├─┬ @koishijs/plugin-status@7.1.3
│ └── koishi@4.14.5 deduped
├─┬ koishi-plugin-assets-local@3.1.0
│ ├─┬ @koishijs/assets@1.0.2
│ │ └── koishi@4.14.5 deduped
│ └── koishi@4.14.5 deduped
├─┬ koishi-plugin-desktop@0.0.4
│ └── koishi@4.14.5 deduped
├─┬ koishi-plugin-puppeteer@3.5.0
│ └── koishi@4.14.5 deduped
├─┬ koishi-plugin-rate-limit@2.0.0
│ └── koishi@4.14.5 deduped
├─┬ koishi-plugin-theme-vanilla@1.0.6
│ └── koishi@4.14.5 deduped
└── koishi@4.14.5

2 个赞

同道中人(雾
你这armv7,约等于是32位arm?
不知道支持情况,我的s905l3a可以,但是u盘让文件segment fault

2 个赞

很有意思的一个现象:用 npm init 跑出来项目出现了上述报错,用 yarn create 项目正常运行。

目前的建议是使用 yarn create

关于前者为什么会有错误,目测是官方版本更新不及时了,我正在研究。

3 个赞

已经确定是我没有及时更新整合包版本所致,现在 npm init 与 yarn create 均正常工作。感谢您的反馈。

2 个赞

好的谢谢你

2 个赞

顺便推荐用 yarn create,我本地垃圾网速上 yarn 比 npm 快两倍(网速够快可以无视

3 个赞