首页 > 其他 > 详细

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

时间:2021-04-15 15:36:14      阅读:287      评论:0      收藏:0      [点我收藏+]

 

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

 

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

原文:https://www.cnblogs.com/shaozhiqi/p/14661826.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!