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

Rishi - Aug 14 '19 - - Dev Community

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

ERROR: There are no scenarios; must have at least one.
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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 -
Enter fullscreen mode Exit fullscreen mode
  • Then do an Update & Install
sudo apt-get update && sudo apt-get install yarn
Enter fullscreen mode Exit fullscreen mode
  • Finally, re-check the version
yarn --version
Enter fullscreen mode Exit fullscreen mode

Happy Hacking πŸ”¨

. . . . . . . . . . . . . . . . . . . .