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. 
 
Any help would be highly appreciable
You can upgrade it through vue cli.
npm install -g @vue/cli
OR
yarn global add @vue/cli
then
vue upgrade
                        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
                        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