javascript 纱线错误:没有场景;必须至少有一个
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/53471063/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Yarn ERROR: There are no scenarios; must have at least one
提问by Francesco Borzi
回答by Francesco Borzi
It looks like that I was trying to execute the wrong yarn, because simply running sudo apt install yarnon my Ubuntu 18.04 gave me yarn from cmdtest.
看起来我试图执行错误的纱线,因为仅仅sudo apt install yarn在我的 Ubuntu 18.04 上运行就给了我来自 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:
并按照官方网站的说明安装它,在我的情况下(Ubuntu 18.04)如下:
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
回答by Peoray
You've got the wrong yarn. The yarn you're executing comes from the cmdtestpackage. Uninstalling cmdtest first should fix this:
你弄错了纱线。您正在执行的纱线来自cmdtest包。首先卸载 cmdtest 应该可以解决这个问题:
sudo apt remove cmdtest
sudo apt remove cmdtest
Once you've uninstalled it, run the commands below to install yarn properly:
卸载它后,运行以下命令以正确安装纱线:
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
回答by Ruan Nawe
sudo apt install --no-install-recommends yarn
sudo apt install --no-install-recommends yarn

