Syntax Error: TypeError: Cannot read property 'parseComponent' of undefined
时间: 2023-08-19 19:06:24 浏览: 247
JS提示:Uncaught SyntaxError:Unexpected token ) 错误的解决方法
回答: 当出现报错信息"Syntax Error: TypeError: Cannot read property 'parseComponent' of undefined"时,通常是由于vue版本与vue-template-compiler两个版本不一致所致。\[1\]这种错误可以通过以下解决方法来解决:首先,找到项目的package.json文件,查看vue和vue-template-compiler两个依赖的版本号是否相同。如果版本号不一致,需要将它们的版本号调整为一致。然后,在终端中运行npm install命令重新下载依赖。这样就可以解决这个问题了。\[3\]
#### 引用[.reference_title]
- *1* *3* [项目运行部署报错:Syntax Error TypeError Cannot read property ‘parseComponent‘ of undefined](https://blog.csdn.net/m0_54864542/article/details/123098816)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [解决Syntax Error: TypeError: Cannot read property ‘parseComponent‘ of undefined](https://blog.csdn.net/gusijin/article/details/119931691)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文