How to upgrade Vue version
23,790
Solution 1
npm install -g @vue/cli --save
--save will automatically update version in your package.json file.
Solution 2
You can upgrade it through vue cli.
npm install -g @vue/cli
OR
yarn global add @vue/cli
then
vue upgrade
Solution 3
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
Author by
Harris Khan
Updated on November 30, 2020Comments
-
Harris Khan over 3 years
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 commandvue --version
and 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.Any help would be highly appreciable