Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to upgrade Vue version

I was using the Vue version (2.5), I ran that command npm install -g @vue/cli after that I check my vue version by using the command vue --versionand it shows me @vue/cli 4.1.2. but in my package.json file the version did not upgrade, it still showing me the older version i.e 2.5.7. enter image description here

Any help would be highly appreciable

like image 554
Harris Khan Avatar asked Dec 31 '19 07:12

Harris Khan


2 Answers

You can upgrade it through vue cli.

npm install -g @vue/cli

OR

yarn global add @vue/cli

then

vue upgrade
like image 107
habib Avatar answered Oct 16 '22 07:10

habib


Both provided answers assume you have a project and you're updating it. If you want to update the global installation, as per the documentation in the Vue website at https://cli.vuejs.org/guide/installation.html you need to do the following:

npm update -g @vue/cli
like image 44
Ilank Avatar answered Oct 16 '22 07:10

Ilank