Closed purerosefallen closed 2 years ago
Hello @purerosefallen,
It seems that you are trying to use OneBot protocol. Have you installed koishi-adapter-onebot
in the Koishi Docker container properly? Here is some information on Koishi website.
@NN708 Yeah but I believe it should be a bug in dockerfile or something else. The docker image should be somewhere to let me install the adapter. In addition, the above documentation says nothing about adapter or how to install it.
Updated:
I just saw the instruction, to let me exec
in, and install the plugins and adapters.
However, I don't think it's a good idea, for the adapters and plugins would be lost after another docker-compose up -d
or container recreation.
In addition, ´sudo npm -g install koishi-adapter-onebot´ does not work. The only way to run it in command line is, to ´koishi init´, install the adapter in, and ´npm start´.
In addition, ´sudo npm -g install koishi-adapter-onebot´ does not work. The only way to run it in command line is, to ´koishi init´, install the adapter in, and ´npm start´.
Plugins and adapters should be installed in the same way. In Docker container, they should be installed locally in the /app
directory, not globally.
I just saw the instruction, to let me
exec
in, and install the plugins and adapters. However, I don't think it's a good idea, for the adapters and plugins would be lost after anotherdocker-compose up -d
or container recreation.
You can use volumes for /app/node_modules
to persist them. If you think the documentation is not very clear, you may help us to improve it.
When I mount /app/node_modules
, the following strange thing would happen. With the above docker-compose
, when I:
/app/node_modules
volumed.docker-compose exec koishijs npm install koishi-plugin-common koishi-adapter-onebot
docker-compose up restart koishijs
koishi-plugin-webui
, to be installed, with additional web console ports exposed. so I docker-compose exec koishijs npm install koishi-plugin-webui
docker-compose up -d koishijs
, in which the container recreated.It said adapter missing again. With a careful check in node_modules
directory, it could be found that koishi-plugin-commonand
koishi-adapter-onebot` are missing again.
It seemed that npm would remove everything not written in package.json
file.. However, if I also volume package.json
it would become directory with the name package.json
file.
Any better solution?
You're right, package.json
also needs to be persistent.
However, if I also volume
package.json
it would become directory with the namepackage.json
file.
I think you should first place the original file on your host machine, then use docker-compose
to create the containers.
close in favor of @koishijs/plugin-manager
Describe the bug
As the title says.
To Reproduce
docker-compose.yml
koishi.config.js
Expected behavior
It should start..
Screenshots
Versions
Additional context