使用Vant 报错(0 , vue__WEBPACK_IMPORTED_MODULE_10__.ref) is not a function)

安装完 vant 以后 报错

报错信息: app.js:127 Uncaught TypeError: (0 , vue__WEBPACK_IMPORTED_MODULE_10__.ref) is not a function

在这里插入图片描述
解决思路 : 查看我们的 package.json 文件中 我们使用的 vant 和 vue 的版本是不是一致的 ,如果不一致 ,把 Vant 卸载掉 重新安装

在这里插入图片描述

解决方案:

  1. 卸载 vant yarn remove vant
  2. 重新安装vant : yarn add [email protected]

tips: 让 vant 和 vue 的版本 保持一致

这样这个头疼的问题就解决了~~~


在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/egg_er/article/details/124647551