$ 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
GitHub 加速计划 / vu / vue
207.54 K
33.66 K
下载
vuejs/vue: 是一个用于构建用户界面的 JavaScript 框架,具有简洁的语法和丰富的组件库,可以用于开发单页面应用程序和多页面应用程序。
最近提交(Master分支:2 个月前 )
73486cb5 * chore: fix link broken Signed-off-by: snoppy <michaleli@foxmail.com> * Update packages/template-compiler/README.md [skip ci] --------- Signed-off-by: snoppy <michaleli@foxmail.com> Co-authored-by: Eduardo San Martin Morote <posva@users.noreply.github.com> 4 个月前
e428d891 Updated Browser Compatibility reference. The previous currently returns HTTP 404. 5 个月前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐