【Mac电脑卸载vue/cli@2.9.6失败】vue create is a Vue CLI 3 only command and you are using Vue CLI 2.9.6.
vue create is a Vue CLI 3 only command and you are using Vue CLI 2.9.6.
·
vue create is a Vue CLI 3 only command and you are using Vue CLI 2.9.6.
You may want to run the following to upgrade to Vue CLI 3:
问题
- vue crete项目时提示 应该升级vue/cli 2.9.6版本
beiluo@beiluodeMBP vue-cli % vue create vue_demo
vue create is a Vue CLI 3 only command and you are using Vue CLI 2.9.6.
You may want to run the following to upgrade to Vue CLI 3:
npm uninstall -g vue-cli
npm install -g @vue/cli
beiluo@beiluodeMBP vue-cli % vue -V
2.9.6
beiluo@beiluodeMBP vue-cli % npm install -g @vue/cli
- 执行卸载重装版本发现没有用,依然是vue/cli 2.9.6版本
npm uninstall -g vue-cli
npm install -g @vue/cli
beiluo@beiluodeMBP vue-cli % npm uninstall -g vue-cli
up to date, audited 1 package in 96ms
found 0 vulnerabilities
beiluo@beiluodeMBP vue-cli % vue -V
2.9.6
beiluo@beiluodeMBP vue-cli % npm install -g @vue/cli
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated subscriptions-transport-ws@0.11.0: The `subscriptions-transport-ws` package is no longer maintained. We recommend you use `graphql-ws` instead. For help migrating Apollo software to `graphql-ws`, see https://www.apollographql.com/docs/apollo-server/data/subscriptions/#switching-from-subscriptions-transport-ws For general help using `graphql-ws`, see https://github.com/enisdenjo/graphql-ws/blob/master/README.md
changed 848 packages in 18s
beiluo@beiluodeMBP vue-cli % vue -V
2.9.6
beiluo@beiluodeMBP vue-cli %
解决方案
1执行命令,查看vue存在路径
which vue
beiluo@beiluodeMBP vue-cli % which vue
/usr/local/bin/vue
beiluo@beiluodeMBP vue-cli %
2.进入目录
cd /usr/local/bin
beiluo@beiluodeMBP vue-cli % cd /usr/local/bin
beiluo@beiluodeMBP bin %
3.卸载删除vue,安装完毕查看vue版本
(1)执行 rm -rf vue卸载删除vue
(2)执行vue -V查看版本
(3)可能需要重新安装,执行 npm install -g @vue/cli 命令
beiluo@beiluodeMBP bin % rm -rf vue
beiluo@beiluodeMBP vue-cli % vue -V
@vue/cli 5.0.8
更多推荐
已为社区贡献3条内容
所有评论(0)