Following the instruction from vue official site, I installed vue-cli via below command in termal:
npm install -g @vue/cli
# OR
yarn global add @vue/cli
For me I used the latter. And then when I fire the command:
vue –version
Then an error pops up:
‘vue’ is not recognized as an internal or external command, operable program or batch file.
I searched for a few placed in the internet, and many recommended adding the path where vue is installed, e.g.
C:\Users\{yourName}\AppData\Roaming\npm
C:\Program Files\nodejs
But none of these works. Finally I used Everything Search to find the vue.cmd, and it was located here:
C:\Users\{YourAccount}\AppData\Local\Yarn\bin
After adding this to system path, and restart my command window/terminal, now it works:
vue –version
3.4.1