主题功能无法正常使用

第一个版本有点问题
等了几个版本还是不能使用捏

先看看现象吧


主题没有下拉菜单,但是可以输入

尝试直接更改内容,并没有什么效果

浏览器无明显报错,

log无相关报错

排除了以下原因:

  1. 浏览器
    使用不同浏览器结果相同
  2. 远程/本地
    改为监听127.0.0.1后结果相同(原先为0.0.0.0)

其他可能有用的信息:

运行模式:

dev workspace中只有两个插件,依赖都仅有koishi

环境信息:

image
package.json

{
  "name": "koishi-app",
  "version": "0.0.0",
  "private": true,
  "files": [
    ".env",
    "koishi.yml"
  ],
  "license": "AGPL-3.0",
  "workspaces": [
    "external/*",
    "external/*/external/*",
    "external/*/external/*/packages/*",
    "external/*/external/*/packages/@*/*",
    "external/*/packages/*",
    "external/*/packages/@*/*",
    "external/satori/adapters/*",
    "external/koishi/plugins/*",
    "external/koishi/plugins/adapter/*",
    "external/koishi/plugins/common/*",
    "external/koishi/plugins/database/*",
    "packages/*",
    "packages/@*/*",
    "plugins/*",
    "plugins/@*/*"
  ],
  "scripts": {
    "new": "koishi-scripts new",
    "setup": "koishi-scripts setup",
    "clone": "koishi-scripts clone",
    "build": "yakumo build",
    "bump": "yakumo version",
    "dep": "yakumo upgrade",
    "pub": "yakumo publish",
    "dev": "cross-env NODE_ENV=development koishi start -r esbuild-register -r yml-register",
    "start": "koishi start"
  },
  "devDependencies": {
    "@koishijs/client": "^5.11.0",
    "@koishijs/plugin-hmr": "^1.1.1",
    "@koishijs/scripts": "^4.1.5",
    "@types/node": "^20.2.5",
    "cross-env": "^7.0.3",
    "esbuild": "^0.17.19",
    "esbuild-register": "npm:@shigma/esbuild-register@^1.1.1",
    "typescript": "^5.1.3",
    "yakumo": "^0.3.13",
    "yakumo-esbuild": "^0.3.22",
    "yakumo-esbuild-yaml": "^0.3.1",
    "yakumo-publish": "^0.3.4",
    "yakumo-publish-sync": "^0.3.2",
    "yakumo-tsc": "^0.3.9",
    "yakumo-upgrade": "^0.3.3",
    "yakumo-version": "^0.3.4",
    "yml-register": "^1.1.0"
  },
  "dependencies": {
    "@koishijs/plugin-adapter-onebot": "5.7.1",
    "@koishijs/plugin-admin": "1.3.0",
    "@koishijs/plugin-analytics": "^1.0.3",
    "@koishijs/plugin-bind": "^1.4.1",
    "@koishijs/plugin-callme": "1.3.2",
    "@koishijs/plugin-commands": "3.2.1",
    "@koishijs/plugin-config": "2.1.0",
    "@koishijs/plugin-console": "5.11.0",
    "@koishijs/plugin-database-sqlite": "3.5.2",
    "@koishijs/plugin-dataview": "2.3.1",
    "@koishijs/plugin-echo": "2.2.3",
    "@koishijs/plugin-help": "2.2.3",
    "@koishijs/plugin-insight": "3.4.1",
    "@koishijs/plugin-inspect": "^1.1.0",
    "@koishijs/plugin-locales": "2.3.1",
    "@koishijs/plugin-logger": "^2.2.3",
    "@koishijs/plugin-login": "^3.1.0",
    "@koishijs/plugin-market": "2.0.4",
    "@koishijs/plugin-rate-limit": "^1.3.2",
    "@koishijs/plugin-sandbox": "3.1.6",
    "@koishijs/plugin-status": "7.1.3",
    "koishi": "4.13.1",
    "koishi-plugin-achievement": "1.0.3",
    "koishi-plugin-assets-local": "3.1.0",
    "koishi-plugin-chat": "4.0.0",
    "koishi-plugin-desktop": "0.0.4",
    "koishi-plugin-dialogue": "4.0.9",
    "koishi-plugin-gocqhttp": "3.7.1",
    "koishi-plugin-messages": "0.1.0",
    "koishi-plugin-puppeteer": "^3.5.0",
    "koishi-plugin-qdvc": "0.2.2",
    "koishi-plugin-text-censor": "1.0.3",
    "koishi-plugin-theme-vanilla": "1.0.4",
    "koishi-plugin-translator-baidu": "1.0.1",
    "koishi-plugin-trpgdice": "1.2.2",
    "koishi-plugin-verifier": "1.1.1"
  }
}

配置信息


插件运行中

运行信息:


theme处打断点可以运行到
theme成功注册到了ctx里了已经

1 个赞

可以尝试新建工作区后看看问题是否仍然存在

新建模板文件之后,使用yarn start主题功能正常,使用yarn dev和上面显示的一样。

2 个赞

确实很奇怪……dev 总是会出现奇怪的函数执行丢失现象。

1 个赞

「不觉得很怪吗?作为一个理科生我觉得这太怪了,很符合我对 dev 模式的想象,缓慢并带着异常。」