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