The solution to the problem that the vue.cmd file cannot be found: first find "path" in the system variable and add "%NPM%"; then install cnpm through the "npm install" command; finally execute the command "cnpm i @vue/cli -g".
Recommended: "vue tutorial"
Vue cannot be found after installation. cmd file
npm config get prefix
Copy the obtained path information, go toDesktop>Right-click Computer> Properties>Advanced System Settings>Environment Variables
Create a new variable NPM in System Variables
. The variable value is the path information copied before, usually C:\Users\xxx\AppData\Roaming\npm
Then find path in System Variables
and add %NPM%
. Keep clicking Save.
npm install -g cnpm --registry=https://registry.npm.taobao.org
npm i npm -g npm i @vue/cli -g //如果还报错也没关系,继续执行下面的命令
cnpm i @vue/cli -g
AppearsAll packages installed (used 6ms(network 2ms), speed 0B/s, json 0(0B), tarball 0B)
is success!
You can try vue -V
. If the version information appears normally, it is a perfect success!
The above is the detailed content of What to do if the vue.cmd file cannot be found. For more information, please follow other related articles on the PHP Chinese website!