错误:
throw new Error(^Error:Vue packages version mismatch:- vue@2.6.12 (C:\Users\Administrator\AppData\Roaming\npm\node_modules\vue\dist\vue.runtime.common.js)
- vue-template-compiler@2.6.11 (C:\Users\Administrator\AppData\Roaming\npm\node_modules\@vue\cli\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\Administrator\AppData\Roaming\npm\node_modules\@vue\cli\node_modules\vue-template-compiler\index.js:10:9)at Module._compile (internal/modules/cjs/loader.js:1158:30)at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)at Module.load (internal/modules/cjs/loader.js:1002:32)at Function.Module._load (internal/modules/cjs/loader.js:901:14)at Module.require (internal/modules/cjs/loader.js:1044:19)at require (internal/modules/cjs/helpers.js:77:18)at Object.<anonymous> (C:\Users\Administrator\AppData\Roaming\npm\node_modules\@vue\cli\node_modules\vue-jscodeshift-adapter\src\parse-sfc.js:1:18)at Module._compile (internal/modules/cjs/loader.js:1158:30)at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
大概原因就是我们的Vue packages版本一致导致的
解决方法:
按照提示找到这个文件
将这个版本号改成提示中的
再次创建解决问题
脚手架创建项目的步骤点击这里