【报错】Cannot read property ‘parseComponent‘ of undefined

简介: 【报错】Cannot read property ‘parseComponent‘ of undefined

报错问题

在这里插入图片描述

报错分析

报错的原因是 vue升级后 vue-template-compiler 中的 parseComponent 函数被删除了。

报错解决

解决这个问题:

  • 需要确认 package.json 中的 vue-template-compiler 是否已经替换为 @vue/compiler-sfc,否则的话需要替换,然后重新安装依赖。
  • 如果还报这个错误,则需要检查下项目引用的第三方依赖是否还有 Vue2 的版本,如果有的话需要对应更新为支持 Vue3 的版本。
相关文章
|
2月前
|
存储 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‘)
|
2月前
|
定位技术 Apache
Echarts——Invalid geoJson format Cannot read property 'length' of undefined
Echarts——Invalid geoJson format Cannot read property 'length' of undefined
40 0
|
2月前
|
JavaScript
VUE——filemanager-webpack-plugin报错TypeError: Cannot read property 'isFile' of undefined
VUE——filemanager-webpack-plugin报错TypeError: Cannot read property 'isFile' of undefined
35 0
|
4月前
|
前端开发 小程序 JavaScript
微信小程序-Unhandled promise rejection TypeError: Cannot read property ‘get‘ of undefined
微信小程序-Unhandled promise rejection TypeError: Cannot read property ‘get‘ of undefined
|
5月前
|
资源调度 前端开发
编译第三方前端项目时候出现Syntax Error: TypeError: Cannot set properties of undefined (setting ‘parent‘)
编译第三方前端项目时候出现Syntax Error: TypeError: Cannot set properties of undefined (setting ‘parent‘)
389 0
|
2月前
|
前端开发 JavaScript
VUE——Uncaught (in promise) TypeError: Cannot read property '__esModule' of undefined
VUE——Uncaught (in promise) TypeError: Cannot read property '__esModule' of undefined
32 0
TypeError: Cannot set properties of undefined (setting ‘resdata‘),res定义数据出现的问题,定义的方法用this换成that
TypeError: Cannot set properties of undefined (setting ‘resdata‘),res定义数据出现的问题,定义的方法用this换成that
Cannot read properties of undefined (reading ‘row‘)
Cannot read properties of undefined (reading ‘row‘)
Cannot read properties of undefined (reading ‘post‘)
Cannot read properties of undefined (reading ‘post‘)
|
3月前
|
JavaScript
element-ui Cannot read properties of undefined (reading ‘name‘),data中写成集合的形式
element-ui Cannot read properties of undefined (reading ‘name‘),data中写成集合的形式
下一篇
无影云桌面