前言
在 Vue 项目中,npm run dev 运行时,报错:
module build failed:
...
cannot read property 'parsecomponent' of undefined ...
可能原因
最常见的原因是 vue
和 vue-template-compiler
的版本号不一致导致的
解决方法
目前有效的解决方案是: 统一 vue
和 vue-template-compiler
的版本号(重新安装):
如在 package.json
中:
"vue-template-compiler": "2.6.11",
"vue": "2.6.11"
参考
issue 1
issue 2
issue 3