Reputation: 265
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 --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
Upvotes: 15
Views: 77839
Reputation: 555
You can use this guide to upgrade to Vue 2.7: Vue 2.7 Migration Guide
Upvotes: 2
Reputation: 787
You can use npx to avoid installing the @vue/cli package globally.
npx --legacy-peer-deps @vue/cli upgrade
Upvotes: 0
Reputation: 203
You can upgrade it through vue cli.
yarn global add @vue/[email protected]
OR
npm i -g @vue/[email protected]
then
vue upgrade
Upvotes: -2
Reputation: 87
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
Upvotes: 3
Reputation: 293
npm install -g @vue/cli --save
Upvotes: -13
Reputation: 483
You can upgrade it through vue cli.
npm install -g @vue/cli
OR
yarn global add @vue/cli
then
vue upgrade
Upvotes: 27