Closed qcfengdaai closed 6 months ago
以我的了解vue3是针对浏览器环境的前端框架,而Wechaty是运行在node中的,无法简单结合。
无反馈,问题关闭。
@qcfengdaai We have planned to build Wechaty in the browser before, and we have an Angular component (under construction) at https://github.com/chatie/angular if you are interested.
I think the latest Angular component can be compiled to be compatible with VUE so that it can also be loaded in VUE.
Please join our Discord for future discussion (I'd love to support it in the future) if you want to run Wechaty directly in the browser.
Wechaty Discord: https://discord.gg/7q8NBZbQzt
我在将workPro 与vue3的hello world 结合时候,提示包有问题,我按操作将,etcd3、aws-sdk等包重新安装后依旧出错。 我是按vue3的官方文档执行命令:npm create vue@latest,然后添加了 workPro的依赖包“ @grpc/grpc-js": "^1.8.12", "@juzi/wechaty": "^1.0.65", "@juzi/wechaty-puppet": "^1.0.61", "@juzi/wechaty-puppet-service": "^1.0.69", "qrcode-terminal": "^0.12.0", "vue": "^3.4.21", "wechaty": "^1.20.2""。在没有添加依赖包的时候,是可以启动 vue3的demo的。添加之后,运行错误如下,
` (base) daifeng@daif-MacBook-Pro wechaty-vue3 % npm run dev
VITE v5.2.9 ready in 684 ms
➜ Local: http://127.0.0.1:5173/ ➜ Network: use --host to expose ➜ press h + enter to show help ✘ [ERROR] Could not resolve "etcd3"
You can mark the path "etcd3" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.
✘ [ERROR] Failed to resolve entry for package "jimp". The package may have incorrect main/module/exports specified in its package.json. [plugin vite:dep-pre-bundle]
This error came from the "onResolve" callback registered here:
The plugin "vite:dep-pre-bundle" was triggered by this import
✘ [ERROR] Could not resolve "aws-sdk"
You can mark the path "aws-sdk" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.
✘ [ERROR] Could not resolve "esdk-obs-nodejs"
You can mark the path "esdk-obs-nodejs" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.`