vue.js - 尝试创建 Vue 项目时如何修复版本不匹配错误?
问题描述
我正在尝试使用简单地创建一个 vue 项目,vue create shop
但不断收到此错误消息:
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
了,但这似乎并没有改变任何东西。
解决方案
在键入此内容时,我发现这yarn global upgrade
适用于我的情况
推荐阅读
- php - Codeigniter 3 - 当我点击一个链接时,它使用完整路径
- ionic4 - ionic 4 ion-button中的下载属性是什么意思?
- python - 有条件地替换numpy数组中的列
- google-app-engine - 所有 App Engine 实例于 25.12 重新启动。和 31.12
- python - 使用带有附加参数的 python 运行程序
- node.js - 是否可以在运行 Ubuntu 机器(服务器)上为 vuejs 项目设置开发模式环境
- android - 如何在android中使用默认拨号屏幕?
- c - 如何在C中将可变参数转换为数组
- graphql - 这个 graphql 模式有什么问题?索引键的类型不匹配
- r - pmml (randomForestModel) 在不同的运行中抛出错误..tree[, 2] 中的错误:维数不正确