Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 966
Francesco Borzi Avatar asked Nov 25 '18 19:11

Francesco Borzi


People also ask

How do I fix command not found on yarn?

To solve the error "yarn: command not found", install the yarn package globally by running npm install -g yarn and restart your terminal. If the command fails, run it with sudo and make sure the correct PATH is set in your system's environment variable.

Why is yarn not recognized?

To solve the error "'yarn' is not recognized as an internal or external command, operable program or batch file", install the yarn package globally by running npm install -g yarn , restart your terminal and make sure your PATH environment variable is set up correctly.

What is yarn in Ubuntu?

Yarn is a tool for managing, updating, and sharing your Java code. Yarn works through node. js helping to track libraries, dependencies, and even enables you to share solutions with other developers. In this tutorial learn how to install Yarn on Ubuntu 18.04. A user account with sudo privileges.


1 Answers

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 
like image 95
Francesco Borzi Avatar answered Sep 30 '22 08:09

Francesco Borzi