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
4

3 回答 3

1

尝试运行npm install -g @vue/cli然后重新加载您的终端。

于 2019-01-03T12:05:33.123 回答
1

你需要卸载 vue-cli,然后安装 @vue/cli。方法如下:

npm uninstall -g vue-cli  
npm install -g @vue/cli
于 2021-05-20T21:41:42.997 回答
-2

也许你已经安装了npm。 尝试和。yarn
npm update --globalyarn global upgrade

祝你好运!!!

于 2019-07-11T09:38:55.703 回答