To build a vue environment using vue-cli
I installed vue-cli from npm, but the vue command is not recognized and I get an error.
npmi-g@vue/cli
vue -- version
vue: The term 'vue' is not recognized as a cmdlet, function, script file, or name of an operational program.
Make sure the name is written correctly, and if it contains a path, make sure it is correct, and try again.
Location line: 1 character: 1
+ vue -- version
+ ~~~
+ CategoryInfo: ObjectNotFound: (vue: String) [ ], CommandNotFoundException
+ Fully QualifiedErrorId—CommandNotFoundException
Do I need to set environment variables after installing vue-cli?
Please let me know.
The environment is Windows 10.
windows-10 vue.js npm
If you use the node.js installer, by default, the script folder is added to the PATH during installation.
If for some reason it is not in PATH, you should check where npm install-g
installs in npm bin-g
and resolve it additionally in PATH.
>npm bin-g
C:\Users\foobar\AppData\Roaming\npm
© 2025 OneMinuteCode. All rights reserved.