vue升级导致TypeError:Cannot read property ‘parseComponent’ of undefined

 

关于:vue升级导致TypeError:Cannot read property ‘parseComponent’ of undefined  问题

 

 

原因:  vue-template-compiler 升级版本后 parseComponent函数已被删除,导致 component-compiler-utils报错。

 

 

解决办法: 查看component-compiler-utils最新版本(https://github.com/vuejs/component-compiler-utils/releases)

 

首先:删除旧版本:

npm uninstall @vue/component-compiler-utils

 

然后: 安装新版本(我目前的最新版本是3.1.2

npm install --dev @vue/component-compiler-utils@3.1.2

 

 

 

 

最新版本已经解决对parseComponent的依赖。问题解决。

原文:https://www.codeleading.com/article/70763858694/

posted @ 2021-08-23 12:17  疯狂遨游的小白  阅读(2938)  评论(0编辑  收藏  举报