Npm Upgrade Vue

Posted on  by admin
Modified1 year ago. I already have vue-cli 3.5.5 installed.

When I run vue create myapp, it shows message 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.

22 gold badges2727 silver badges4040 bronze badges.

4040 bronze badges.
3
vue-cli 3.x is changed to @vue/cli.
1

Therefore, no direct upgrade exists. Uninstall old version if you no longer need it, or if latest install command gives error:. Use the following command to install the latest vue-cli version:.

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.

yarn global add @vue/[email protected]

However, I did not verify this.

npm i -g @vue/[email protected]

22 gold badges2727 silver badges4040 bronze badges.

vue upgrade

4040 bronze badges.

What is a migration build?

As the docs https://cli.vuejs.org/guide/installation.html#upgrading mentioned, you can update it like this :.

Workflow