问题

Syntax Error: TypeError: Cannot read property ‘parseComponent’ of undefined

Vue packages version mismatch

Failed to compile.

./src/App.vue
Module Error (from ./node_modules/vue-loader/lib/index.js):


Vue packages version mismatch:

- vue@2.6.10 (D:\site\hst_tech\hst_platform_frontend\node_modules\vue\dist\vue.runtime.common.js)
- vue-template-compiler@2.6.14 (D:\site\hst_tech\hst_platform_frontend\node_modules\vue-template-compiler\package.json)

This may cause things to work incorrectly. Make sure to use the same version for both.
If you are using vue-loader@>=10.0, simply update vue-template-compiler.
If you are using vue-loader@<10.0 or vueify, re-installing vue-loader/vueify should bump vue-template-compiler to the latest.

解决方法

将vue-template-compiler@2.6.14版本改变vue-template-compiler@2.6.10

// 把版本号改成一样的就行了
npm i -g vue-template-compiler@2.6.10 --save
Logo

前往低代码交流专区

更多推荐