vue error If you are using vue-loader@>=10.0, simply update vue-template-compiler.

 

G:\2021workspace\vue\LearnVueJS2\myweb>npm start

> myweb@1.0.0 start
> npm run dev


> myweb@1.0.0 dev
> webpack-dev-server --inline --progress --config build/webpack.dev.conf.js

 94% asset optimization

 ERROR  Failed to compile with 2 errors                                                                      上午10:42:16

 error  in ./src/App.vue

Module build failed: Error:

Vue packages version mismatch:

- vue@2.6.11 (G:\2021workspace\vue\LearnVueJS2\myweb\node_modules\vue\dist\vue.runtime.common.js)
- vue-template-compiler@2.6.12 (G:\2021workspace\vue\LearnVueJS2\myweb\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 lat
est.

    at Object.<anonymous> (G:\2021workspace\vue\LearnVueJS2\myweb\node_modules\vue-template-compiler\index.js:10:9)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)

更新即可解决问题:

G:\2021workspace\vue\LearnVueJS2\myweb>npm update

changed 1 package in 26s

G:\2021workspace\vue\LearnVueJS2\myweb>

G:\2021workspace\vue\LearnVueJS2\myweb>npm run dev

> myweb@1.0.0 dev
> webpack-dev-server --inline --progress --config build/webpack.dev.conf.js

 13% building modules 30/35 modules 5 active ...ace\vue\LearnVueJS2\myweb\src\App.vue{ parser: "babylon" } is deprecated;
 we now treat it as { parser: "babel 95% emitting

 DONE  Compiled successfully in 5589ms                                                                       上午10:48:15

 I  Your application is running here: http://localhost:8080

 

posted @ 2021-04-15 11:52  ~清风煮酒~  阅读(7607)  评论(0编辑  收藏  举报