youzan / vant-weapp

轻量、可靠的小程序 UI 组件库
https://vant.pro/vant-weapp/
MIT License
17.67k stars 3.48k forks source link

[Bug Report] "isVNode" is not exported by "node_modules/@dcloudio/uni-mp-vue/dist/vue.runtime.esm.js" #5859

Open windf17 opened 1 month ago

windf17 commented 1 month ago

重现链接

uni-preset-vue@1.0.0 dev:mp-weixin

uni -p mp-weixin

请注意运行模式下,因日志输出、sourcemap 以及未压缩源码等原因,性能和包体积,均不及发行模式。若要正式发布,请点击发行菜单或使用 cli 发布命令进行发布 正在编译中... node_modules/@vant/use/dist/index.esm.mjs (79:2): "isVNode" is not exported by "node_modules/@dcloudio/uni-mp-vue/dist/vue.runtime.esm.js", imported by "node_modules/@vant/use/dist/index.esm.mjs". file: E:/works/StampExhibition/stamp_uniapp/node_modules/@vant/use/dist/index.esm.mjs:79:2

77: // src/useRelation/useChildren.ts 78: import { 79: isVNode, ^ 80: provide, 81: reactive,

at ../node_modules/@vant/use/dist/index.esm.mjs:79:2 77: // src/useRelation/useChildren.ts 78: import { 79: isVNode, ^ 80: provide, 81: reactive,

Vant Weapp 版本

4.9.3

描述一下你遇到的问题。

编译成h5一切正常,但是编译到微信小程序时报错了。

重现步骤

npm run dev:mp-weixin

基于uni-app、vue3.4、vite5.3.5

设备/浏览器

No response

Lgowen commented 1 month ago

如果要用vant的小程序组件库应该是要用对应的包吧? https://vant-ui.github.io/vant-weapp/#/home

windf17 commented 1 month ago

如果要用vant的小程序组件库应该是要用对应的包吧? https://vant-ui.github.io/vant-weapp/#/home

我在用typescript、vue3、uniapp平台使用vant ui库,vue3版本。 难道要用小程序版本的ui库??

LiangHarvey commented 1 month ago

我也碰到这问题。 原因可能是vue版本vant3不兼容微信小程序(https://ask.dcloud.net.cn/question/150038)。 你可以尝试换成vant-weapp的包,不过我换成vant-weapp包在微信开发者工具报了没找到van-empty的error,我就没用van-empty组件了。不管了。