DEV Community

Rishi
Rishi

Posted on • Updated on

YARN " ERROR: There are no scenarios; must have at least one. "

In Ubuntu, executing the command yarn can give you this quizzical error message:

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

My friend, you've got the wrong yarn 😄

✅ Check the version of yarn you have on your system against the released versions https://github.com/yarnpkg/yarn/releases

yarn -v

If the versions differ enormously, then you probably have a yarn package which is part of cmdtest black box testing of Unix command-line tools.

⚠️ Remove the existing yarn (at your own risk) ⚠️

sudo apt-get -remove yarn

And proceed with the instructions from yarnpkg

Simplified instructions:

  • Start by adding the yarn proper package repository
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
  • Then do an Update & Install
sudo apt-get update && sudo apt-get install yarn
  • Finally, re-check the version
yarn --version

Happy Hacking 🔨

Latest comments (1)

Collapse
 
milan_vala profile image
milan vala

thanks