Error command failed: yard
Solution 1: enter CMD in Win + R to enter the command line interface
Input command
npm install -g yarn
After success, re create the vue-cli4 project to solve the problem.
Solution 2:
Enter the C/users/administrator/Windows environment
There is a file. Vuerc
Open this file to show
{
"useTaobaoRegistry": true,
"packageManager": "yarn"
}
Just manually change the configuration content yarn to NPM to change the package manager when creating the project
Solution 3:
Delete the. Vuerc file. When creating a Vue project for the first time, you will be prompted to select configuration, and then you can select NPM.