Vue-cli: Error: command failed: yarn

Created on 7 May 2018  Â·  5Comments  Â·  Source: vuejs/vue-cli

Version

3.0.0-beta.6

Reproduction link

http://fuckkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk.com

Steps to reproduce

vue create a-new-project

What is expected?

Run without any error

What is actually happening?

✨ Creating project in D:\a-new-project.
🗃 Initializing git repository...
âš™ Installing CLI plugins. This might take a while...

'yarn' is not recognized as an internal or external command,
operable program or batch file.
ERROR command failed: yarn

Most helpful comment

This is probably related to your setup not having yarn correctly installed (or removed) but selected at some point. You can revert back to npm by changing ~/.vuerc

Closing as this is a system question and please do not post fake repro links like that again, thanks

All 5 comments

This is probably related to your setup not having yarn correctly installed (or removed) but selected at some point. You can revert back to npm by changing ~/.vuerc

Closing as this is a system question and please do not post fake repro links like that again, thanks

@posva the command uses to create a new project, so what kind of repo link do you want? I don't get it

If you experience something like this, first check out you have yarn installed or not.

yarn --version

Install yarn resolved this issue.

@posva How do you do that on Windows tho?

Surely vue should select any available one one it sees that yarn does not exist anymore the same way it recognizes when npm and yarn are both installed.

If you want to do it quickly, you should install "yarn"

npm install -g yarn

or

sudo npm install -g yarn

Was this page helpful?
0 / 5 - 0 ratings