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/


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM