wechaty / puppet-padlocal

Puppet PadLocal is a Pad Protocol for WeChat
https://wechaty.js.org/docs/puppet-providers/padlocal
Apache License 2.0
642 stars 88 forks source link

TypeError [ERR_INVALID_ARG_TYPE]: The "listener" argument must be of type function. Received undefined\n #134

Closed liuxiaojinla closed 2 years ago

liuxiaojinla commented 2 years ago

我使用npm i安装了最新的wechaty,但是似乎不兼容,导致了一些错误信息: TypeError [ERR_INVALID_ARG_TYPE]: The "listener" argument must be of type function. Received undefined at checkListener (node:events:128:3) at _addListener (node:events:423:3) at StateSwitch.addListener (node:events:487:10) at PuppetPadlocal._startClient (C:\Users\NINGMEI\Desktop\wechaty\node_modules\wechaty-puppet-padlocal\dist\puppet-padlocal.js:98:24) at PuppetPadlocal.start (C:\Users\NINGMEI\Desktop\wechaty\node_modules\wechaty-puppet-padlocal\dist\puppet-padlocal.js:95:20) at WechatyImpl.start (C:\Users\NINGMEI\Desktop\wechaty\node_modules\wechaty\dist\cjs\src\wechaty-mixins\puppet-mixin.js:70:68) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async WechatyImpl.start (C:\Users\NINGMEI\Desktop\wechaty\node_modules\wechaty\dist\cjs\src\wechaty-mixins\login-mixin.js:107:13) at async WechatyImpl.start (C:\Users\NINGMEI\Desktop\wechaty\node_modules\wechaty\dist\cjs\src\wechaty-mixins\io-mixin.js:21:13) at async WechatyImpl.start (C:\Users\NINGMEI\Desktop\wechaty\node_modules\state-switch\dist\cjs\src\service-ctl\service-ctl.js:58:21) { code: 2, details: 'TypeError [ERR_INVALID_ARG_TYPE]: The "listener" argument must be of type function. Received undefined\n' + ' at checkListener (node:events:128:3)\n' + ' at _addListener (node:events:423:3)\n' + ' at StateSwitch.addListener (node:events:487:10)\n' + ' at PuppetPadlocal._startClient (C:\Users\NINGMEI\Desktop\wechaty\node_modules\wechaty-puppet-padlocal\dist\puppet-padlocal.js:98:24)\n' + ' at PuppetPadlocal.start (C:\Users\NINGMEI\Desktop\wechaty\node_modules\wechaty-puppet-padlocal\dist\puppet-padlocal.js:95:20)\n' + ' at WechatyImpl.start (C:\Users\NINGMEI\Desktop\wechaty\node_modules\wechaty\dist\cjs\src\wechaty-mixins\puppet-mixin.js:70:68)\n' + ' at processTicksAndRejections (node:internal/process/task_queues:96:5)\n' + ' at async WechatyImpl.start (C:\Users\NINGMEI\Desktop\wechaty\node_modules\wechaty\dist\cjs\src\wechaty-mixins\login-mixin.js:107:13)\n' + ' at async WechatyImpl.start (C:\Users\NINGMEI\Desktop\wechaty\node_modules\wechaty\dist\cjs\src\wechaty-mixins\io-mixin.js:21:13)\n' + ' at async WechatyImpl.start (C:\Users\NINGMEI\Desktop\wechaty\node_modules\state-switch\dist\cjs\src\service-ctl\service-ctl.js:58:21)' }

zzhoouxin commented 2 years ago

我也遇到同样的问题。。

sv-98-maxin commented 2 years ago

这不打算解决了嘛😂

suntong commented 2 years ago

Have you ever made padlocal worked before?

If not, you'll have better chance get it working if starting from here -- padlocal/wechaty-puppet-padlocal-demo#13

Took me quite an effort to get those versions that works (对应的Client端与Server端的版本对应清单). YMMV.

padlocal commented 2 years ago

Fixed