DEV Community

Rishi
Rishi

Posted on • Edited on

2 2

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.
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 🔨

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

Top comments (1)

Collapse
 
milan_vala profile image
milan vala

thanks

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay