唉,对于计算机的bug是真的很害怕。但是这个错误,我发现解决起来还是蛮简单的。

参考这篇博客:

(2条消息) 错误“Cannot read properties of undefined (reading ‘install‘) at Vue.use” 的解决方案_cannot read properties of undefined (reading 'inst_FunSober的博客-CSDN博客


原因分析

原因主要就是我们在下载vue-router的时候下载的是最新版的以4开头),但是这个版本它是给vue3准备的,所以我们要卸载router,然后限制他的版本


解决方法:

在终端运行:

npm uninstall vue-router
npm install --save vue-router@3

成功解决!!!

Logo

基于 Vue 的企业级 UI 组件库和中后台系统解决方案,为数万开发者服务。

更多推荐