Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 无法启动插件:Error [ERR_REQUIRE_ESM]: require() of ES Module ... not supported. #319

Closed
Cysime opened this issue Nov 29, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Cysime
Copy link

Cysime commented Nov 29, 2024

使用Koishi的Docker镜像运行

System:
OS: Linux 6.8 Alpine Linux
CPU: (4) arm64 Neoverse-N1
Binaries:
Node: 20.16.0
Yarn: 4.1.1
Koishi:
Core: 4.18.2
Console: 5.29.3

Chatluna版本:1.0.0-rc.0

安装后,无法启用插件:
WEB UI提示:
插件加载失败,这可能是插件本身的问题所致。请联系插件作者并反馈此问题。
日志:

2024-11-29 13:42:14 [I] console webui is available at http://127.0.0.1:5140
2024-11-29 13:42:14 [I] auth creating admin account
2024-11-29 13:42:36 [W] config failed to load chatluna
2024-11-29 13:42:36 [W] config Error [ERR_REQUIRE_ESM]: require() of ES Module /koishi/node_modules/fetch-socks/index.js from /koishi/node_modules/koishi-plugin-chatluna/lib/utils/request.cjs not supported.
                        Instead change the require of index.js in /koishi/node_modules/koishi-plugin-chatluna/lib/utils/request.cjs to a dynamic import() which is available in all CommonJS modules.
                            at Object.<anonymous> (/koishi/node_modules/koishi-plugin-chatluna/lib/utils/request.cjs:41:26)
2024-11-29 13:42:44 [I] loader apply plugin chatluna:8821tv
2024-11-29 13:42:44 [E] loader Error [ERR_REQUIRE_ESM]: require() of ES Module /koishi/node_modules/fetch-socks/index.js from /koishi/node_modules/koishi-plugin-chatluna/lib/utils/request.cjs not supported.
                        Instead change the require of index.js in /koishi/node_modules/koishi-plugin-chatluna/lib/utils/request.cjs to a dynamic import() which is available in all CommonJS modules.
                            at Object.<anonymous> (/koishi/node_modules/koishi-plugin-chatluna/lib/utils/request.cjs:41:26)

@dingyi222666 dingyi222666 self-assigned this Nov 29, 2024
@dingyi222666 dingyi222666 added the bug Something isn't working label Nov 29, 2024
@dingyi222666
Copy link
Member

下周五我会发布 1.0.0-rc.1 版本,该版本将会修复此问题。

如果你现在就很想体验修复后的效果,可前往 Koishi 面板的依赖管理,将 ChatLuna 版本降级为 1.0.0-beta.128

a511e2d10fcc71be17c9cf10d5da5a1d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants