美文网首页
Vue packages version mismatch: 版

Vue packages version mismatch: 版

作者: 缺月楼 | 来源:发表于2020-04-16 11:22 被阅读0次
$ vue create my-xiaoxin
C:\Users\DELL\AppData\Local\Yarn\Data\global\node_modules\vue-template-compiler\index.js:10
  throw new Error(
  ^

Error:

Vue packages version mismatch:

- vue@2.5.13 (C:\Users\DELL\node_modules\vue\dist\vue.runtime.common.js)
- vue-template-compiler@2.6.11 (C:\Users\DELL\AppData\Local\Yarn\Data\global\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.

    at Object.<anonymous> (C:\Users\DELL\AppData\Local\Yarn\Data\global\node_modules\?[4mvue-template-compiler?[24m\index.js:10:9)
?[90m    at Module._compile (internal/modules/cjs/loader.js:1158:30)?[39m
?[90m    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)?[39m
?[90m    at Module.load (internal/modules/cjs/loader.js:1002:32)?[39m
?[90m    at Function.Module._load (internal/modules/cjs/loader.js:901:14)?[39m
?[90m    at Module.require (internal/modules/cjs/loader.js:1044:19)?[39m
?[90m    at require (internal/modules/cjs/helpers.js:77:18)?[39m
    at Object.<anonymous> (C:\Users\DELL\AppData\Local\Yarn\Data\global\node_modules\?[4mvue-jscodeshift-adapter?[24m\src\parse-sfc.js:1:18)
?[90m    at Module._compile (internal/modules/cjs/loader.js:1158:30)?[39m
?[90m    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)?[39m

将vue的版本改成和vue-template-compiler@2.6.11 一样即可

npm install vue@2.6.11 --save

相关文章

网友评论

      本文标题:Vue packages version mismatch: 版

      本文链接:https://www.haomeiwen.com/subject/vvtrvhtx.html