Closed huan closed 3 years ago
The whole Wechaty ecosystem is moving towards ES Modules and we are refactoring the modules slowly.
See:
The above error message means that you are trying to load a non-ESM compatible puppet module.
Please file a new issue on that puppet repo to record the problem, and a link back to this issue will be welcome.
const puppet = new PuppetPadlocal() const bot = new Wechaty({ puppet })
The above code should work as a workaround.
We have added compatible code for load CJS puppet modules in wechaty@0.73.8 or above versions.
wechaty@0.73.8
The whole Wechaty ecosystem is moving towards ES Modules and we are refactoring the modules slowly.
See:
TypeError: MyPuppet is not a constructor
The above error message means that you are trying to load a non-ESM compatible puppet module.
Please file a new issue on that puppet repo to record the problem, and a link back to this issue will be welcome.
Solution
The above code should work as a workaround.