Yarn ERROR: There are no scenarios; must have at least one

Francesco Borzi picture Francesco Borzi · Nov 25, 2018 · Viewed 19.5k times · Source

I tried to install Yarn and when I used the yarn command I got:

00h00m00s 0/0: : ERROR: There are no scenarios; must have at least one.

my yarn --version is 0.32. Why doesn't it work?

Answer

Francesco Borzi picture Francesco Borzi · Nov 25, 2018

It looks like that I was trying to execute the wrong yarn, because simply running sudo apt install yarn on my Ubuntu 18.04 gave me yarn from cmdtest.

So I solved by uninstalling it:

sudo apt remove yarn

And by installing it as the official website explains, which in my case (Ubuntu 18.04) it was the following:

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee
/etc/apt/sources.list.d/yarn.list
sudo apt update && sudo apt install yarn