'vue' is not an internal or external command, nor is it a runnable program or batch file.

reason. npm is already installed. But no environment variable is configured

Solution Configuration Environment Variables

First find the npm path

npm config list

Set this path to the environment variable

requires attention

If there are no vue and vue.cmd files in this directory

 I don't have it here because I installed the global vue using yarn

use

yarn global bin

 Command to get the global bin path of yarn

C:\Users\Administrator\AppData\Local\Yarn\bin

open it up

is what i want

You can configure the path to the environment variable

 

 After the configuration is complete, you need to restart cmd

 

Guess you like

Origin blog.csdn.net/mp624183768/article/details/122924671