Create Vue cli project and report error command failed: Yarn
Solution 1:
Enter C:/users/administrator/in the windows environment
There is a file . Vuerc
Open this file to display
{
“useTaobaoRegistry”: true,
“packageManager”: “yarn”
}
Just manually change the configuration content yarn to NPM to change the package manager when the project is created
Solution 2:
Delete the. Vuerc file. When you create a Vue project for the first time, you will be prompted to select the configuration, and then select NPM.
Solution 3: enter CMD in Win + R to enter the command line interface
Enter command
npm install -g yarn
After success, the problem can be solved by re creating vue-cli4 project.