【问题标题】:How to fix version mismatch error when trying to create a Vue project?尝试创建 Vue 项目时如何修复版本不匹配错误?
【发布时间】:2020-06-15 18:33:19
【问题描述】:

我正在尝试使用 vue create shop 简单地创建一个 vue 项目,但不断收到此错误消息:

Error: 

Vue packages version mismatch:

- vue@2.6.11 (/home/roy/.config/yarn/global/node_modules/vue/dist/vue.runtime.common.js)
- vue-template-compiler@2.6.10 (/home/roy/.config/yarn/global/node_modules/vue-jscodeshift-adapter/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.

我试过npm install vue-template-compiler --save-dev,但这似乎并没有改变任何东西。

【问题讨论】:

    标签: vue.js


    【解决方案1】:

    在键入此内容时,我发现 yarn global upgrade 在我的情况下有效

    【讨论】:

      猜你喜欢
      • 2021-08-24
      • 2012-12-19
      • 2017-09-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-01-05
      相关资源
      最近更新 更多