vue升级导致TypeError:Cannot read property ‘parseComponent‘ of undefined
原因:是vue-template-compiler 升级版本后 parseComponent函数已被删除,导致 component-compiler-utils报错。
解决办法:
- 删除旧版本:
npm uninstall @vue/component-compiler-utils - 更新最新版本:
npm install --dev @vue/component-compiler-utils@3.2.0 - 把vue-template-compiler版本的2.6.10改为2.6.11