New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wangfaxi1985 opened this Issue Mar 2, 2017 · 24 comments

Comments

Projects
None yet
@wangfaxi1985

wangfaxi1985 commented Mar 2, 2017

i want use "yarn " in my npm project
when run shell " yarn " in the shell,
it throw "ERROR: There are no scenarios; must have at least one. "

what problem?

yarn --version
0.27
node -v
v6.9.5
uname -a
Linux wfx-pc 4.4.0-3-deepin-amd64 #1 SMP Deepin 4.4.30-2 (2016-12-01) x86_64 GNU/Linux

@OmerHerera

This comment has been minimized.

Show comment
Hide comment
@OmerHerera

OmerHerera Mar 2, 2017

@wangfaxi1985, please check again your yarn version, the latest version is 0.21.3 and the tagged version is 0.22.0-0.
Also check that you run yarn command in the folder where your package.jsonis located
Thanks

OmerHerera commented Mar 2, 2017

@wangfaxi1985, please check again your yarn version, the latest version is 0.21.3 and the tagged version is 0.22.0-0.
Also check that you run yarn command in the folder where your package.jsonis located
Thanks

@Daniel15

This comment has been minimized.

Show comment
Hide comment
@Daniel15

Daniel15 Mar 4, 2017

Member

You've got the wrong yarn 😄 The Yarn you're executing comes from the cmdtest package: http://manpages.ubuntu.com/manpages/xenial/man1/yarn.1.html. Uninstalling cmdtest should fix this. Once you've uninstalled it, follow the instructions on https://yarnpkg.com/en/docs/install#linux-tab to add the Yarn repo:

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
Member

Daniel15 commented Mar 4, 2017

You've got the wrong yarn 😄 The Yarn you're executing comes from the cmdtest package: http://manpages.ubuntu.com/manpages/xenial/man1/yarn.1.html. Uninstalling cmdtest should fix this. Once you've uninstalled it, follow the instructions on https://yarnpkg.com/en/docs/install#linux-tab to add the Yarn repo:

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

@Daniel15 Daniel15 closed this Mar 4, 2017

@becdetat

This comment has been minimized.

Show comment
Hide comment
@becdetat

becdetat Jun 5, 2017

cmdtest seems to be installed by default on Ubuntu 17.04 at least, so perhaps this should be added to the installation instructions...

For anyone that finds this, if you're getting an error on sudo apt-get install yarn run sudo apt remove cmdtest first.

becdetat commented Jun 5, 2017

cmdtest seems to be installed by default on Ubuntu 17.04 at least, so perhaps this should be added to the installation instructions...

For anyone that finds this, if you're getting an error on sudo apt-get install yarn run sudo apt remove cmdtest first.

@peter-kehl

This comment has been minimized.

Show comment
Hide comment
@peter-kehl

peter-kehl Sep 28, 2017

On Ubuntu (at least 17.04), after you sudo apt remove cmdtest, first follow https://yarnpkg.com/en/docs/install#linux-tab > Ubuntu. Only then sudo apt-get install yarn. If you don't follow https://yarnpkg.com/en/docs/install#linux-tab, then running sudo apt-get install yarn will install cmdtest again.

peter-kehl commented Sep 28, 2017

On Ubuntu (at least 17.04), after you sudo apt remove cmdtest, first follow https://yarnpkg.com/en/docs/install#linux-tab > Ubuntu. Only then sudo apt-get install yarn. If you don't follow https://yarnpkg.com/en/docs/install#linux-tab, then running sudo apt-get install yarn will install cmdtest again.

@HalfdanJ HalfdanJ referenced this issue Oct 27, 2017

Closed

issue with yarn #5

@istals

This comment has been minimized.

Show comment
Hide comment
@istals

istals Oct 31, 2017

On Ubuntu 17.10 I'm not able to install yarn - I removed cmdtest package, but sudo apt-get install yarn reinstall cmdtest.

istals commented Oct 31, 2017

On Ubuntu 17.10 I'm not able to install yarn - I removed cmdtest package, but sudo apt-get install yarn reinstall cmdtest.

@yuqingc

This comment has been minimized.

Show comment
Hide comment
@yuqingc

yuqingc Nov 3, 2017

@istals I have the same problem as you do. The cmdtest is still installed even if I remove it firstly. How do I get yarn on Ubuntu 17.10?

yuqingc commented Nov 3, 2017

@istals I have the same problem as you do. The cmdtest is still installed even if I remove it firstly. How do I get yarn on Ubuntu 17.10?

@jdorleans

This comment has been minimized.

Show comment
Hide comment
@jdorleans

jdorleans Nov 3, 2017

For Ubuntu 17.10, try the workaround:

sudo apt remove cmdtest
sudo apt install npm
sudo npm install -g yarn

jdorleans commented Nov 3, 2017

For Ubuntu 17.10, try the workaround:

sudo apt remove cmdtest
sudo apt install npm
sudo npm install -g yarn
@Daniel15

This comment has been minimized.

Show comment
Hide comment
@Daniel15

Daniel15 Nov 3, 2017

Member

For Ubuntu 17.10, you need to add the Yarn repo first.

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 remove cmdtest
sudo apt install yarn

Make sure you remove cmdtest if you have it installed.

Prefer this to installing via npm.

@jdorleans - you don't have to install npm if you're using Yarn :)

Member

Daniel15 commented Nov 3, 2017

For Ubuntu 17.10, you need to add the Yarn repo first.

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 remove cmdtest
sudo apt install yarn

Make sure you remove cmdtest if you have it installed.

Prefer this to installing via npm.

@jdorleans - you don't have to install npm if you're using Yarn :)

@yuqingc

This comment has been minimized.

Show comment
Hide comment
@yuqingc

yuqingc Nov 3, 2017

@jdorleans Thanks for your comment. I have successfully installed yarn by using npm install -g yarn.

yuqingc commented Nov 3, 2017

@jdorleans Thanks for your comment. I have successfully installed yarn by using npm install -g yarn.

@sheerun

This comment has been minimized.

Show comment
Hide comment
@sheerun

sheerun Nov 27, 2017

Contributor

Ubuntu: let's name binary of node package nodejs, but also let cmdtest binary be yarn

Contributor

sheerun commented Nov 27, 2017

Ubuntu: let's name binary of node package nodejs, but also let cmdtest binary be yarn

@cserpell

This comment has been minimized.

Show comment
Hide comment
@cserpell

cserpell Nov 30, 2017

This would be much easier if instead of installing it as root, it was installed in user space.

cserpell commented Nov 30, 2017

This would be much easier if instead of installing it as root, it was installed in user space.

@Daniel15

This comment has been minimized.

Show comment
Hide comment
@Daniel15

Daniel15 Nov 30, 2017

Member

@cserpell You can do that if you like. There's an install script you can use, or you could just download the Yarn tarball and extract it wherever you want. Details are on the site. Regardless, you're still going to have the issue of having multiple different multiple yarn binaries if you have cmdtest installed.

@sheerun To be fair, cmdtest used the yarn command first, before Yarn even existed.

Member

Daniel15 commented Nov 30, 2017

@cserpell You can do that if you like. There's an install script you can use, or you could just download the Yarn tarball and extract it wherever you want. Details are on the site. Regardless, you're still going to have the issue of having multiple different multiple yarn binaries if you have cmdtest installed.

@sheerun To be fair, cmdtest used the yarn command first, before Yarn even existed.

@cserpell

This comment has been minimized.

Show comment
Hide comment
@cserpell

cserpell Nov 30, 2017

@Daniel15 That's what I did, specially because I cannot install programs where I am working. The trick is just overriding any installed binary with my own bin directory.

cserpell commented Nov 30, 2017

@Daniel15 That's what I did, specially because I cannot install programs where I am working. The trick is just overriding any installed binary with my own bin directory.

@egonyuri

This comment has been minimized.

Show comment
Hide comment
@egonyuri

egonyuri Mar 22, 2018

I was having the same problem on Ubuntu 18.04 however I was able to fix using the following commands:

sudo apt remove cmdtest
sudo apt remove yarn
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

egonyuri commented Mar 22, 2018

I was having the same problem on Ubuntu 18.04 however I was able to fix using the following commands:

sudo apt remove cmdtest
sudo apt remove yarn
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
@Nazarah

This comment has been minimized.

Show comment
Hide comment
@Nazarah

Nazarah Apr 12, 2018

@Daniel15 I followed your instructions in previous comment and tried to reinstall yarn again.

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

after checking the version, i found the version to be 1.5.1
Is it ok? Or I did something wrong.
Also would it create any problem if I uninstall cmdtest and all its dependencies?

Nazarah commented Apr 12, 2018

@Daniel15 I followed your instructions in previous comment and tried to reinstall yarn again.

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

after checking the version, i found the version to be 1.5.1
Is it ok? Or I did something wrong.
Also would it create any problem if I uninstall cmdtest and all its dependencies?

@Daniel15

This comment has been minimized.

Show comment
Hide comment
@Daniel15

Daniel15 Apr 12, 2018

Member

@Nazarah - That's correct, 1.5.1 is the latest stable version. If you want to get 1.6.0, you need to add the RC repo instead (replace "stable" with "rc" in /etc/apt/sources.list.d/yarn.list)

Member

Daniel15 commented Apr 12, 2018

@Nazarah - That's correct, 1.5.1 is the latest stable version. If you want to get 1.6.0, you need to add the RC repo instead (replace "stable" with "rc" in /etc/apt/sources.list.d/yarn.list)

@Nazarah

This comment has been minimized.

Show comment
Hide comment
@Nazarah

Nazarah Apr 12, 2018

@Daniel15
unintalling cmdtest and dependency and installing yarn.txt

The 1st text file shows commad results from uninstalling cmdtest and all its dependencies till using your suggested commands to install yarn

installing yarn fresh.txt

this files shows when I tried to run yarn from home

Nazarah commented Apr 12, 2018

@Daniel15
unintalling cmdtest and dependency and installing yarn.txt

The 1st text file shows commad results from uninstalling cmdtest and all its dependencies till using your suggested commands to install yarn

installing yarn fresh.txt

this files shows when I tried to run yarn from home

@Daniel15

This comment has been minimized.

Show comment
Hide comment
@Daniel15

Daniel15 Apr 12, 2018

Member

I edited my comment because I realised that 1.5.1 is the latest version of Yarn :)

Member

Daniel15 commented Apr 12, 2018

I edited my comment because I realised that 1.5.1 is the latest version of Yarn :)

@Nazarah

This comment has been minimized.

Show comment
Hide comment
@Nazarah

Nazarah Apr 12, 2018

Thanks for your feedback. :D

Nazarah commented Apr 12, 2018

Thanks for your feedback. :D

@Nazarah

This comment has been minimized.

Show comment
Hide comment
@Nazarah

Nazarah Apr 12, 2018

@OmerHerera

Also check that you run yarn command in the folder where your package.jsonis located

Do you mean package.json for mastarm?

Nazarah commented Apr 12, 2018

@OmerHerera

Also check that you run yarn command in the folder where your package.jsonis located

Do you mean package.json for mastarm?

@florianeBhz

This comment has been minimized.

Show comment
Hide comment
@florianeBhz

florianeBhz Apr 24, 2018

@becdetat I have Ubuntu 17.04 installed but when I type yarn --version after installing yarn as recommended, i got this as message « yarn » is not installed yet.You can install by typing : sudo apt install cmdtest. Then I run sudo apt install cmdtest but it failled.

florianeBhz commented Apr 24, 2018

@becdetat I have Ubuntu 17.04 installed but when I type yarn --version after installing yarn as recommended, i got this as message « yarn » is not installed yet.You can install by typing : sudo apt install cmdtest. Then I run sudo apt install cmdtest but it failled.

@Daniel15

This comment has been minimized.

Show comment
Hide comment
@Daniel15

Daniel15 Apr 25, 2018

Member

@florianeBhz You need to add the Yarn repo first:

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

Then you can sudo apt-get update && sudo apt-get install yarn

More details on the Yarn site: https://yarnpkg.com/en/docs/install#debian-stable

Member

Daniel15 commented Apr 25, 2018

@florianeBhz You need to add the Yarn repo first:

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

Then you can sudo apt-get update && sudo apt-get install yarn

More details on the Yarn site: https://yarnpkg.com/en/docs/install#debian-stable

@benjaoming

This comment has been minimized.

Show comment
Hide comment
@benjaoming

benjaoming May 14, 2018

For your Debian package, consider either conflicting with cmdtest in the debian/control; add a diversion in case the cmdtest executable already exists; use the update-alternatives pattern described here: https://wiki.debian.org/DebianAlternatives

benjaoming commented May 14, 2018

For your Debian package, consider either conflicting with cmdtest in the debian/control; add a diversion in case the cmdtest executable already exists; use the update-alternatives pattern described here: https://wiki.debian.org/DebianAlternatives

JREAM added a commit to JREAM/config-ubuntu that referenced this issue May 16, 2018

@Daniel15

This comment has been minimized.

Show comment
Hide comment
@Daniel15

Daniel15 May 28, 2018

Member

; use the update-alternatives pattern described here: wiki.debian.org/DebianAlternatives

Alternatives are for when you have multiple different apps that do the same thing. It's not for dealing with naming conflicts.

Having said that, adding a conflict with cmdtest seems reasonable. We can do that!

Member

Daniel15 commented May 28, 2018

; use the update-alternatives pattern described here: wiki.debian.org/DebianAlternatives

Alternatives are for when you have multiple different apps that do the same thing. It's not for dealing with naming conflicts.

Having said that, adding a conflict with cmdtest seems reasonable. We can do that!

Daniel15 added a commit that referenced this issue May 28, 2018

Update Debian package to "conflict" with cmdtest
The `cmdtest` package also installs a `yarn` command, and people often get confused by this (see #2821). If we specify that the Yarn package conflicts with the cmdtest package, installing Yarn will automatically uninstall cmdtest.

arcanis added a commit that referenced this issue May 28, 2018

Update Debian package to "conflict" with cmdtest (#5898)
The `cmdtest` package also installs a `yarn` command, and people often get confused by this (see #2821). If we specify that the Yarn package conflicts with the cmdtest package, installing Yarn will automatically uninstall cmdtest.

yvanzo added a commit to yvanzo/musicbrainz-docker that referenced this issue Jul 3, 2018

Remove cmdtest if installed before installing yarn
since both packages conflict,
see yarnpkg/yarn#2821

Note: Since Ubuntu 17.04, cmdtest is installed by default.

yvanzo added a commit to yvanzo/musicbrainz-docker that referenced this issue Jul 4, 2018

Replace npm with yarn as per MBS v-2018-04-23
- Update yarnpkg apt repository only.

- Remove cmdtest if already installed as it conflicts with yarn,
  see yarnpkg/yarn#2821

  (Since Ubuntu 17.04, cmdtest is installed by default.)

yvanzo added a commit to yvanzo/musicbrainz-docker that referenced this issue Jul 4, 2018

Replace npm with yarn as per MBS v-2018-04-23
- Update yarnpkg apt repository only.

- Remove cmdtest if already installed as it conflicts with yarn,
  see yarnpkg/yarn#2821

  (Since Ubuntu 17.04, cmdtest is installed by default.)

jsturgis added a commit to metabrainz/musicbrainz-docker that referenced this issue Jul 6, 2018

Replace npm with yarn as per MBS v-2018-04-23
- Update yarnpkg apt repository only.

- Remove cmdtest if already installed as it conflicts with yarn,
  see yarnpkg/yarn#2821

  (Since Ubuntu 17.04, cmdtest is installed by default.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment