I already have vue-cli 3.5.5 installed. When I run vue create myapp
, it shows message Update available 3.6.2
.
Vue CLI v3.5.5
┌───────────────────────────┐
│ Update available: 3.6.2 │
└───────────────────────────┘
How to upgrade vue-cli to the latest version?
When I run npm i -g vue-cli
it installs vue-cli version 2.9.6 instead of upgrading the existing vue cli version.
OS: Ubuntu 18.04.1.
node version: 10.15.3.
nvm version: 0.34.0.
@OrestesKappa Just install vue at the version you want or just use npm install vue@latest --save to get the latest (note that updating from 2 to 3 requires quite some changes and many extensions haven't been updated yet).
5.0. 3 (2022-03-15)
In my personal opinion, you should just install @vue/cli in your home or $HOME , and export the binaries from node modules bin folder to access it globally without providing a sudo password. Avoid the -g flag while installing.
vue-cli 3.x is changed to @vue/cli. Therefore, no direct upgrade exists.
npm uninstall -g vue-cli
$ npm install -g @vue/cli@latest
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
or yarn
can be used to upgrade vue-cli.
However, when working within nvm
, the yarn command yarn global add @vue/cli
did not work.
If you do not use nvm
then installing via yarn
might work. However, I did not verify this.
As the docs https://cli.vuejs.org/guide/installation.html#upgrading mentioned, you can update it like this :
npm update -g @vue/cli
# OR
yarn global upgrade --latest @vue/cli
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With