1

I am attempting to update my Vue version to the most recent, however after running "npm install -g @vue/cli" (as told to by the vue website), it said everything ran fine and shows 3.2.3 had installed, but when running vue --version to check, it shows as 3.0.1.

I then figured I would uninstall all vue instances but, regardless of global or local uninstalls, it would always still show vue --version as 3.0.1.

No matter what I tried, I can not seem to remove vue form my system for a fresh install, nor simply update from 3.0.1 to the latest version.

Not sure what sort of indo would be best to show here?

--

Bit more info here,

I ran "Which Vue" and the result was -

/usr/local/bin/vue

I also the ran npm list -g --depth=0

/usr/local/Cellar/node/11.6.0/lib
├── @vue/cli@3.2.3
└── npm@6.5.0

However, running - vue -V (or even vue --version) gives me just:

3.0.1
KJParker
  • 710
  • 2
  • 9
  • 26

4 Answers4

1

Try running npm install -g @vue/cli then reload your terminal.

  • I think this command installed Vue 2 on my system, where as I am using Vue 3. But, even after adjusting ( I believe they use vue/cli now?) it didnt seem to work. My system says it has installed, but Vue -v still shows it as 3.0.1 – KJParker Jan 04 '19 at 15:36
  • VueJS is a framework, the CLI is a command line interface that helps set up projects. So yes, it will install Vue @ version 2.*.* but that command line interface is 3.*.* –  Jan 04 '19 at 15:38
  • Check out this link for the CLI installation https://cli.vuejs.org/guide/installation.html –  Jan 04 '19 at 15:39
  • Apologies, `vue-cli` and `vue/cli` are two different things. –  Jan 04 '19 at 15:40
  • I did try that already and no use (I used that to install, and again to update, and it works/installs, but upon doing the last command to check (vue --version) it shows "3.0.1" instead of the newer version (3.2.x) – KJParker Jan 04 '19 at 15:41
  • Remove the old version first `npm uninstall @vue/cli -g` and then `npm install -g @vue/cli` –  Jan 04 '19 at 15:43
1

You need to uninstall vue-cli, and then install @vue/cli. Here is how:

npm uninstall -g vue-cli  
npm install -g @vue/cli
Paul Roub
  • 36,322
  • 27
  • 84
  • 93
Tom Green
  • 43
  • 4
0

3 steps to update from vue 3 lower version to the latest:

  • npm install -g @vue/cli
  • vue upgrade
  • npm i
ejuhjav
  • 2,660
  • 2
  • 21
  • 32
e3d
  • 1
-2

Maybe you have npm and yarn installed.
Try npm update --global and yarn global upgrade.

Good luck!!!

alvaro.canepa
  • 562
  • 3
  • 13