Home > Web Front-end > Vue.js > What to do if the vue.cmd file cannot be found

What to do if the vue.cmd file cannot be found

藏色散人
Release: 2020-11-17 11:38:24
Original
5111 people have browsed it

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".

What to do if the vue.cmd file cannot be found

Recommended: "vue tutorial"

Vue cannot be found after installation. cmd file

Step 1: Configure path (already configured can be skipped)

npm config get prefix
Copy after login

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.

The second step: install cnpm

npm install -g cnpm --registry=https://registry.npm.taobao.org
Copy after login

The third step (the most critical!)

npm i npm -g npm i @vue/cli -g //如果还报错也没关系,继续执行下面的命令
Copy after login
cnpm i @vue/cli -g
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template