How to upgrade my global vue-cli install to the latest version?
For anyone still having this issue I ran through the following steps:
Switched to latest stable Node.js release using Node Version Manager
nvm install 14.16.0
Uninstalled previous @vue/cli package
npm uninstall -g @vue/cli
npm uninstall -g vue-cli (v2.* and older)
Globally installed latest stable release
npm install -g @vue/cli@latest
Opened a new terminal window for the change to take effect; checked the version by running below command
vue --version
Kudos to Antony for his original answer.
vue-cli 3.x is changed to @vue/cli. Therefore, no direct upgrade exists.
- Uninstall old version if you no longer need it, or if latest install command gives error:
npm uninstall -g vue-cli
- Use the following command to install the latest vue-cli version:
$ npm install -g @vue/cli@latest
Notes
Do not run
$ npm i -g vue-cli
because vue-cli 3.x is changed to @vue/cli.The vue-cli update issue states that either
npm
oryarn
can be used to upgrade vue-cli. However, when working withinnvm
, the yarn commandyarn global add @vue/cli
did not work. If you do not usenvm
then installing viayarn
might work. However, I did not verify this.