vue command not recognized

Asked 2 months ago, Updated 2 months ago, 4 views


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.

[email protected]/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

2022-09-30 11:59

1 Answers

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


2022-09-30 11:59

If you have any answers or tips


© 2022 OneMinuteCode. All rights reserved.