missing puppets in latest docker image
Created by: tianlinle
Important:Please file the issue follow the template, or we won't help you to solve the problem.
0. Report Issue Guide
- Please run the following command and check whether the problem has been fixed:
rm -rf package-lock.json
rm -rf node_modules
npm install
-
Please search in FAQ List first, and make sure your problem has not been solved before.
-
Please search in the issue first, and make sure your problem had not been reported before
1. Versions
-
What is your wechaty version? Answer: 0.27.53
-
Which puppet are you using for wechaty? (padchat/puppeteer/padpro/...) Answer: padchat
-
What is your wechaty-puppet-XXX(padchat/puppeteer/) version? Answer: 0.18.1
-
What is your node version? (run
node --version
) Answer: 10.16.0 -
What os are you using Answer: Mac
2. Describe the bug
Refer to https://docs.chatie.io/v/zh/best-practice#start. When I run wechaty with puppet-padchat by docker(latest image), it shows:
INFO PuppetManager install(wechaty-puppet-padchat@^0.18.1) please wait ...
I've navigated to folder /wechaty/node_modules in docker, and can't find any puppet installed.
3. To Reproduce
Steps to reproduce the behavior:
- Download the latest version of the wechaty docker image
- Create mybot.js
const { Wechaty } = require('wechaty');
const bot = new Wechaty({
puppet: 'wechaty-puppet-padchat',
puppetOptions: {
token: 'xxx'
}
});
bot
.on('scan', (qrcode, status) => console.log(`Scan QrCode to login: ${status}\n${qrcode}`))
.on('login', user => console.log(`User ${user} logined`))
.on('message', message => console.log(`Message: ${message}`))
.start();
- Run command
docker run -ti --rm --volume="$(pwd)":/bot zixia/wechaty mybot.js
4. Expected behavior
Should not try to install puppet-padchat.
5. Actual behavior
It tries to install the puppet-padchat.
6. Full Output Logs
Show Logs
$ docker run -ti -e WECHATY_LOG=silly --rm --volume="$(pwd)":/bot zixia/wechaty mybot.js
__ __ _ _
\ \ / /__ ___| |__ __ _| |_ _ _
\ \ /\ / / _ \/ __| '_ \ / _` | __| | | |
\ V V / __/ (__| | | | (_| | |_| |_| |
\_/\_/ \___|\___|_| |_|\__,_|\__|\__, |
|___/
____________________________________________________
https://www.chatie.io
____ _ _
/ ___|___ _ __ _ __ ___ ___| |_(_)_ __ __ _
| | / _ \| '_ \| '_ \ / _ \/ __| __| | '_ \ / _` |
| |__| (_) | | | | | | | __/ (__| |_| | | | | (_| |
\____\___/|_| |_|_| |_|\___|\___|\__|_|_| |_|\__, |
|___/
____ _ _ ____ _
/ ___| |__ __ _| |_| __ ) ___ | |_ ___
| | | '_ \ / _` | __| _ \ / _ \| __/ __|
| |___| | | | (_| | |_| |_) | (_) | |_\__ \
\____|_| |_|\__,_|\__|____/ \___/ \__|___/
WECHATY Environment Variables: 2
WECHATY_LOG=silly
WECHATY_DOCKER=1
Starting Docker Container for Wechaty v0.0.0 with Node.js v10.16.0 ...
Working directory: /bot
Please make sure you had installed all the NPM modules which is depended on your bot script.
Executing babel-node --presets @babel/env mybot.js
16:57:38 SILL Config WECHATY_LOG set level to silly
16:57:38 INFO Config registering process.on("unhandledRejection") for development/debug
16:57:38 VERB Config constructor()
16:57:38 SILL Accessory #0<Wechaty> constructor()
16:57:38 VERB Wechaty contructor()
16:57:38 VERB StateSwitch constructor(name=Wechaty)
16:57:38 VERB StateSwitch constructor(name=WechatyReady)
16:57:38 VERB Wechaty on(scan, function) registered
16:57:38 VERB Wechaty onFunction(scan)
16:57:38 VERB Wechaty on(login, function) registered
16:57:38 VERB Wechaty onFunction(login)
16:57:38 VERB Wechaty on(message, function) registered
16:57:38 VERB Wechaty onFunction(message)
16:57:38 SILL Wechaty version() form development environment is not availble: ENOENT: no such file or directory, stat '/wechaty/dist/.git'
16:57:38 INFO Wechaty <wechaty-puppet-padchat>() start() v0.0.0 is starting...
16:57:38 VERB Wechaty puppet: wechaty-puppet-padchat
16:57:38 VERB Wechaty name: undefined
16:57:38 VERB Wechaty id: cjy6288za000013qk7r3a884r
16:57:38 SILL StateSwitch <Wechaty> on() is false
16:57:38 SILL StateSwitch <WechatyReady> off() is true
16:57:38 VERB StateSwitch <WechatyReady> off(true) <- (true)
16:57:38 SILL StateSwitch <Wechaty> on() is false
16:57:38 VERB StateSwitch <Wechaty> on(pending) <- (false)
16:57:38 VERB MemoryCard constructor(undefined)
16:57:38 VERB MemoryCard getStorage() for storage type: N/A
16:57:38 VERB MemoryCard load() from storage: N/A
16:57:38 VERB MemoryCard load() no storage
16:57:38 VERB Wechaty initPuppet() wechaty-puppet-padchat
16:57:38 VERB MemoryCard multiplex(puppet)
16:57:38 VERB MemoryCard static multiplex(MemoryCard<>, puppet)
16:57:38 VERB MemoryCard constructor({"multiplex":{"name":"puppet","parent":{"payload":{},"multiplexNameList":[]}}})
16:57:38 VERB PuppetManager resolve({puppet: wechaty-puppet-padchat, puppetOptions: {"token":"xxx"}})
16:57:38 VERB PuppetManager resolveName(wechaty-puppet-padchat)
16:57:38 VERB PuppetManager checkModule(wechaty-puppet-padchat)
16:57:38 SILL PuppetManager checkModule(wechaty-puppet-padchat) not installed.
16:57:38 INFO PuppetManager install(wechaty-puppet-padchat@^0.18.1) please wait ...
7. Additional context
Add any other context about the problem here.
[bug]