项目场景:

最近在学Vue3,刚搭建完项目开发,想使用Vue-router,但是在新建history对象和router对象的时候,页面报错了,“The requested module '/@modules/vue.js' does not provide an export named 'markNonReactive'”

问题描述:

在vue-router也可以看到到createWebHashHistory,但是在页面导出使用的时候,页面又报错,找不到这个模块![在这里插入图片描述](https://img-blog.csdnimg.cn/img_convert/e3e2c956a4f27c79c8bcd9df392fd52b.png)![在这里插入图片描述](https://img-blog.csdnimg.cn/img_convert/9fdc8b410debdce3d89a9ac71079ec74.png) ![在这里插入图片描述](https://img-blog.csdnimg.cn/img_convert/b04a1a999c289030800e65aa12e08b82.png)

解决方案:

在这里卡了很久,最后发现是我安装的vue-router版本不对,重新安装个版本就可以了,` npm i vue-router@4.0.0-beta.3`
Logo

前往低代码交流专区

更多推荐