How to upgrade Vue-cli from version 2.9.6 to 3.0

install using the following command, but the version of vue-V is always 2.9.6

npm install -g @vue/cli
-sharp OR
yarn global add @vue/cli
$ node -v

v8.12.0

 $  vue -V

2.9.6

tried node reinstallation, invalid
npm yarn global installation is invalid, all are the latest version

Aug.19,2021

npm uninstall -g vue-cli
npm install -g @vue/cli
yarn global remove vue-cli
yarn global add @vue/cli

uninstall the original and then reinstall it. ide/installation.html" rel=" nofollow noreferrer "> about Vue CLI 3
the package name of the old version
Vue CLI has been changed from vue-cli to @ vue/cli. If you have installed the old version of vue-cli (1.x or 2.x) globally, you need to uninstall it through npm uninstall vue-cli-g or yarn global remove vue-cli first.

Node version requires
Vue CLI requires Node.js 8.9 or later (8.11.0 + recommended). You can use nvm or nvm-windows to manage multiple Node versions on the same computer.


probably not. Vue-cli3 and 2 are two completely different versions, not to mention upgrading cli. Unless you reinstall the cli, configuration plugin


I also encounter this problem, is the path problem, has been solved, you can learn from this. https://juejin.im/post/5bf7d6.,

Menu