0

I was checking the version of Vue on my computer, and I noticed I have two different versions. What's wrong here?

I recently updated my Vue CLI to 3.10.0, and got a few errors popping up. I checked my npm packages, and discovered this other version of Vue 2.5.17.

<bash>: npm list -g
[email protected]
└─┬ [email protected]
  ├─┬ @starptech/[email protected]
  │ ├─┬ @starptech/[email protected]
  │ │ ├── @starptech/[email protected]
  │ │ ├─┬ @starptech/[email protected]
  │ │ │ ├── [email protected]
  │ │ │ ├─┬ [email protected]
  │ │ │ │ └── [email protected]
  │ │ │ ├── [email protected] deduped
  │ │ │ ├── [email protected]
  │ │ │ ├── [email protected] deduped
  │ │ │ ├── [email protected] deduped
  │ │ │ ├─┬ [email protected]
.
.
.
<bash>: vue --version
3.10.0

Anytime is run Vue create I get a bunch of error, and I'm assuming it has to do with my two versions of Vue colliding.

Phil
  • 157,677
  • 23
  • 242
  • 245
mfe96
  • 3
  • 3

1 Answers1

1

There is a significant difference between global and local installs. @vue/cli is latest at 3.10 (as of this writing) and is installed globally because it is run from the command line. vue is usually installed locally and versions can vary from project to project. The latest version of vue is 2.6.10 as of this writing. Unclear why you would have issues with create unless you did not uninstall the prior version of the cli:

"If you have the previous vue-cli (1.x or 2.x) package installed globally, you need to uninstall it first with npm uninstall vue-cli -g"

Ref: https://cli.vuejs.org/guide/installation.html

Some other quick reads:

https://flaviocopes.com/npm-packages-local-global/

https://nodejs.org/en/blog/npm/npm-1-0-global-vs-local-installation/

ExcessJudgment
  • 228
  • 1
  • 9