ERROR in ./node_modules/vant export ‘createVNode‘ (imported as ‘_createVNode‘) was not found in ‘vue
ERROR in ./node_modules/vant/es/nav-bar/NavBar.mjs 83:61-73 export 'createVNode' (imported as '_createVNode') was not found in 'vue’
·
背景:
已经安装Vant,但是引用Vant里面组件库时候报错:ERROR in ./node_modules/vant/es/nav-bar/NavBar.mjs 83:61-73 export 'createVNode' (imported as '_createVNode') was not found in 'vue’
解决方法:
Vant库安装版本不适配,版本安装包为3.0+,此处需要更正为2.0+
使用命令行安装vant2项目
npm i vant@latest-v2 -S
重新启动项目,即可不报错。
更多推荐
已为社区贡献6条内容
所有评论(0)