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
772 stars 342 forks source link

The requested module 'wechaty' does not provide an export named 'Message' #274

Closed Spider-lilili closed 1 year ago

Spider-lilili commented 1 year ago

import {WechatyBuilder, Message} from 'wechaty' if (message.type() == message.Image){

}

import {WechatyBuilder, Message} from 'wechaty' ^^^^^^^ SyntaxError: The requested module 'wechaty' does not provide an export named 'Message' at ModuleJob._instantiate (node:internal/modules/esm/module_job:128:21) at async ModuleJob.run (node:internal/modules/esm/module_job:194:5) at async Promise.all (index 0) at async ESMLoader.import (node:internal/modules/esm/loader:409:24) at async loadESM (node:internal/process/esm_loader:85:5) at async handleMainPromise (node:internal/modules/run_main:61:12)

npm --version:8.12.1 node --version: 18.4.0

Spider-lilili commented 1 year ago

import {WechatyBuilder, Message} from 'wechaty' if (message.type() == wechaty.Message.Type.Image){

}