Closed brotherbear2008 closed 2 years ago
The video tutorial is outdated, it's for Wechaty v0.x (before Nov 2021)
The current latest version is v1.x (after Nov 2021),
You need to follow the latest example code at https://github.com/wechaty/getting-started/blob/main/examples/ding-dong-bot.ts
You have a typo here: import {Wecharty, ScanStatus, log} from "wechaty"
Wechaty
, not Wecharty
file:///Users/macbookpro/Documents/ding-dong-bot/ding-dong-bot.js:1 import {Wecharty, ScanStatus, log} from "wechaty" ^^^^^^^^ SyntaxError: The requested module 'wechaty' does not provide an export named 'Wecharty' at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21) at async ModuleJob.run (node:internal/modules/esm/module_job:181:5) at async Promise.all (index 0) at async ESMLoader.import (node:internal/modules/esm/loader:281:24) at async loadESM (node:internal/process/esm_loader:88:5) at async handleMainPromise (node:internal/modules/run_main:65:12)