wechaty / getting-started

A Starter Project Template for Wechaty works out-of-the-box
https://gitpod.io/#https://github.com/wechaty/wechaty-getting-started
Apache License 2.0
798 stars 351 forks source link

TypeError: _asyncToGenerator is not a function #49

Closed csea007 closed 6 years ago

csea007 commented 6 years ago

I encountered a issue when using the example file of tuling123-bot.js to process onMessage event

No matter what messages had been sent to robot, it reported same error:

02:42:17 ERR Wechaty onFunction(message) listener exception: TypeError: _asyncToGenerator is not a function TypeError: _asyncToGenerator is not a function at Wechaty._onMessage (/bot/tuling.js:53:16) at Wechaty.onMessage (/bot/tuling.js:49:21) at Wechaty.on.args (/wechaty/src/wechaty.ts:538:18) at Wechaty.emit (events.js:182:13) at Wechaty.EventEmitter.emit (domain.js:442:20) at Wechaty.emit (/wechaty/src/wechaty.ts:304:18) at Wechaty. (/wechaty/src/wechaty.ts:646:18) at Generator.next () at fulfilled (/wechaty/dist/src/wechaty.js:4:58) at process._tickCallback (internal/process/next_tick.js:68:7)

Who can help me to take a look? Is it related to Babel? Thanks in advance.

huan commented 6 years ago

Yes, it seems related to your node environment.

Which node version did you use?

Wechaty should run without any problem under Node.js v10

csea007 commented 6 years ago

this issue has been fixed after installed Babel related module, close this issue