Yarn ERROR: There are no scenarios; must have at least one
Try this step by step. This worked for me.
sudo apt remove yarn
sudo apt install curl
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
The real name you should use when installing is yarnpkg
sudo apt install yarnpkg
That is the solution.
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
yarn
You've got the wrong yarn. The yarn you're executing comes from the cmdtest
package. Uninstalling cmdtest first should fix this:
sudo apt remove cmdtest
Once you've uninstalled it, run the commands below to install yarn properly:
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