Open phper5 opened 3 years ago
这个不算bug,抱歉不太懂js。我直接运行会提示 SyntaxError: Cannot use import statement outside a module 然后我把 import { Wechaty } from 'wechaty' 改成了 const { Wechaty } = require ('wechaty')
再运行就提示 Emitted 'error' event on Wechaty instance at: at Wechaty.start (./node_modules/wechaty/dist/cjs/src/wechaty.js:568:18) { code: 14, details: 'No connection established', metadata: Metadata { internalRepr: Map(0) {}, options: {} } }
代码就完全是首页Example里的代码, 我只是换了个token
如果不太了解js,推荐你直接使用 wechaty-getting-start 项目中的案例直接运行。
这个不算bug,抱歉不太懂js。我直接运行会提示 SyntaxError: Cannot use import statement outside a module 然后我把 import { Wechaty } from 'wechaty' 改成了 const { Wechaty } = require ('wechaty')
再运行就提示 Emitted 'error' event on Wechaty instance at: at Wechaty.start (./node_modules/wechaty/dist/cjs/src/wechaty.js:568:18) { code: 14, details: 'No connection established', metadata: Metadata { internalRepr: Map(0) {}, options: {} } }