大家好,又见面了,我是你们的朋友全栈君。
1、安装yarn
代码语言:javascript复制sudo apt-get update
sudo apt-get upgrade
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-get install yarn
验证
代码语言:javascript复制yarn --version
2、换源
代码语言:javascript复制yarn config set registry https://registry.npm.taobao.org
提示:如果输入yarn报错(There are no scenarios ; must have at least one)则按如下进行升级
代码语言:javascript复制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
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/141438.html原文链接:https://javaforall.cn