图文详解--亲测有效---Vue-cli3 更新 vue create is a Vue CLI 3 only command and you are using Vue CLI 2.9.6.
Vue-cli3 更新 vue create is a Vue CLI 3 only command and you are using Vue CLI 2.9.6.
2.9.6 初始化项目是用 vue init webpack my-project3.0以上 初始化项目是用 vue create my-project
这是因为你安装的是2.9的版本用了3.0的命令
解决方法:1.用2.9的命令初始化项目
vue init webpack my-project
2.卸载2.9升级到3.0
按照提示
文章图片
按照提示你安装成功的话 你安装成功的是4(因为当前 Vue CLI 的最新版就是 4)https://github.com/vuejs/vue-cli github上的源码
如果你非要安装 3 的话:
npm i -g @vue/cli@^3.12.1
Vue CLI 3需要 nodeJs ≥ 8.9 (官方推荐 8.11.0+,你可以使用 nvm 或 nvm-windows在同一台电脑中管理多个 Node 版本)。
查看node版本
更新
1.先执行卸载掉旧的确认卸载干净
npm uninstall -g vue-cli
确认卸载干净
文章图片
卸载不干净的时候以cmd管理员身份运行 鼠标右键
文章图片
确保卸载干净然后在继续下一步
文章图片
2.安装@vue/cli (Vue CLI 3的包名称由
vue-cli
改成了 @vue/cli
)cnpm install -g @vue/cli
文章图片
查看版本 vue --vuesion
文章图片
/*****安装指定版本*******/
3.0以下npm install -g vue-cli@版本号
3.0以上npm install -g @vue/cli@版本号
【图文详解--亲测有效---Vue-cli3 更新 vue create is a Vue CLI 3 only command and you are using Vue CLI 2.9.6.】
推荐阅读
- Java|Java OpenCV图像处理之SIFT角点检测详解
- C语言浮点函数中的modf和fmod详解
- 雨中漫步百湖之城——武汉
- 【亲测好用】高逼格配色网站推荐
- 图文小编《杨浦、成毅》为你发布!无价之宝随意摆放的公园
- 虚拟DOM-Diff算法详解
- LSTM网络层详解及其应用实例
- OC:|OC: WKWebView详解
- SwiftUI|SwiftUI iOS 瀑布流组件之仿CollectionView不规则图文混合(教程含源码)
- vue中的条件判断详解v-if|vue中的条件判断详解v-if v-else v-else-if v-show