New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
导入import { Wechaty } from 'wechaty'报错 #2681
Comments
The error you're encountering is due to attempting to import import { WechatyBuilder } from 'wechaty';
const bot = WechatyBuilder.build({
// options here
}); This approach aligns with the latest Wechaty documentation and should resolve the import error you're facing. Your Node.js version (v18.16.0) is compatible with Wechaty, as it requires Node.js version ">=16". Additionally, be aware that the default puppet in Wechaty has recently changed. If your project depends on the default puppet, ensure you're using the correct configuration and dependencies. If issues persist, providing more details about your project setup could help in offering a more specific solution.
|
import { Wechaty } from 'wechaty'
^^^^^^^
SyntaxError: The requested module 'wechaty' does not provide an export named 'Wechaty'
at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:190:5)
Node.js v18.16.0
The text was updated successfully, but these errors were encountered: