当前位置:网站首页>解决报错:Uncaught TypeError: Cannot read properties of undefined (reading ‘install‘)
解决报错:Uncaught TypeError: Cannot read properties of undefined (reading ‘install‘)
2022-07-21 03:40:00 【薇z】
在做vue2项目时出现如下错误,页面空白且控制台出现如下错误:
报错内容:
Uncaught TypeError: Cannot read properties of undefined (reading 'install')
at Vue.use (vue.runtime.esm.js?c320:5709:1)
at eval (index.js?5aa4:7:1)
at ./src/router/index.js (app.js:491:1)
at __webpack_require__ (app.js:584:33)
at fn (app.js:818:21)
at eval (main.js:4:65)
at ./src/main.js (app.js:480:1)
at __webpack_require__ (app.js:584:33)
at app.js:1706:109
at __webpack_require__.O (app.js:630:23)
报错图片:
解决办法:
出现该情况的原因是vue-router安装的版本太高,一般vue2的项目对应的版本是[email protected]版本
在控制台输入: cnpm install --save [email protected] 重新安装vue-router即可解决
如果没有安装cnpm命令的,可以先安装:cnpm install
边栏推荐
- [introduction to QT] signal slot mechanism
- Find a single dog -- repeat the number twice to find a single number
- China phosphorus pentachloride Market Research and investment forecast report (2022 Edition)
- Distributed Base theory
- C language file operation
- Software testing interview question: how do you think to improve the efficiency and effect of communication between testers and developers? What is the key to maintaining a good interpersonal relation
- Software test interview question: what kind of network protocol does the Internet adopt? The main hierarchy of the agreement? What protocol is used for internet physical address and IP address transla
- Penetration test - Application of file containing vulnerabilities and PHP pseudo protocol
- Tencent im practice: low code and ultra fast instant address book
- [QT入门篇]信号槽机制
猜你喜欢
Teach you how to install MySQL database by hand
MySQL advanced (b)
Recommended collection | practical operation, data console selection example
DOM 事件流(事件捕获和事件冒泡)
分布式.高并发概念和设计目标
MYSQL07_ Get date function, aggregate function, string function
FTP service configuration
Web APIs DOM- 网页特效篇-元素大小和位置
[qt primer] Application of window classes
List container series operations (detailed)
随机推荐
Distribué. ID Builder
动态内存管理2之柔性数组
[QT入门篇]窗口类的应用
How to realize the data structure of nested tables in SQL
SAP smartforms print failure message type: ssfcomposer message number: 601 (currency and number field setting reference and format)
SAP IDoc tutorial: definition, structure, type, format and table-019
Web APIs DOM- 网页特效篇-元素大小和位置
MYSQL07_ Get date function, aggregate function, string function
分布式.达到什么指标才算高并发
Software test interview question: briefly describe what you have done in your previous work and what you are familiar with. The reference answers are as follows.
分布式.ID生成器
hcip第二天实验
L1-003 single digit statistics
打造高性能应用,持续优化用户体验
中国五氯化磷市场调研与投资预测报告(2022版)
【LeetCode】1260. 2D mesh migration
腾讯IM实战:低代码超快实现即时通讯录
Matrix
Distributed What index is high concurrency
Arduino I2C for tca9548a response scanner