vue报错: ERROR TypeError: Cannot read property 'version' of undefined

简介: vue报错: ERROR TypeError: Cannot read property 'version' of undefined

在打开项目的时候 输入命令npm run serve

运行项目发现了这样的报错

导致项目无法运行

ERROR  TypeError: Cannot read property 'version' of undefined

这里在创建项目的时候

使用到代码检测工具eslint的报错

解决办法

eslint比较麻烦 咱们用不惯 就直接删掉吧

1:在控制台输入

npm uninstall eslint --save

卸载eslint

2:卸载完成

打开package.json文件

找到eslint版本位置 删除即可

删除此段代码:"@vue/cli-plugin-eslint": "~5.0.0",

3:重新运行项目 报错消失

相关文章
|
前端开发 小程序 JavaScript
微信小程序-Unhandled promise rejection TypeError: Cannot read property ‘get‘ of undefined
微信小程序-Unhandled promise rejection TypeError: Cannot read property ‘get‘ of undefined
|
存储 API Windows
MASM32连接程序时error A2006: undefined symbol : u
MASM32连接程序时error A2006: undefined symbol : u
|
定位技术 Apache
Echarts——Invalid geoJson format Cannot read property 'length' of undefined
Echarts——Invalid geoJson format Cannot read property 'length' of undefined
524 0
|
JavaScript
VUE——filemanager-webpack-plugin报错TypeError: Cannot read property 'isFile' of undefined
VUE——filemanager-webpack-plugin报错TypeError: Cannot read property 'isFile' of undefined
626 0
|
前端开发 JavaScript
VUE——Uncaught (in promise) TypeError: Cannot read property '__esModule' of undefined
VUE——Uncaught (in promise) TypeError: Cannot read property '__esModule' of undefined
683 0
|
存储 JavaScript 前端开发
成功解决:Cannot read properties of undefined (reading ‘commit‘)
这篇文章提供了解决Vuex中"Cannot read properties of undefined (reading 'commit')"错误的两种方法:检查模板中的数据属性是否存在,以及确保在Vue实例中正确挂载了store对象。
成功解决:Cannot read properties of undefined (reading ‘commit‘)
webpack版本问题 Cannot read property ‘createHash‘ of undefined
webpack版本问题 Cannot read property ‘createHash‘ of undefined
448 1
TypeError: Cannot set properties of undefined (setting ‘resdata‘),res定义数据出现的问题,定义的方法用this换成that
TypeError: Cannot set properties of undefined (setting ‘resdata‘),res定义数据出现的问题,定义的方法用this换成that