最近打开用vue create 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:
此处应为vue的版本存在更新,需要先卸载vue cli2,然后重新安装vue cli 3。
对于已经用了那么久得2.9.6版本而言,我显然是舍不得得 ,但是迫于无奈 ,还是更新了版本。步骤如下
- 首先对原有得版本进行卸载
npm uninstall vue-cli -g
or
yarn global remove vue-cli
- 重新安装新的版本
npm install -g @vue/cli
or
yarn global add @vue/cli
- 查看已经安装的版本,就可以重新创建项目了
vue -V