Ubuntu:安装yarn
一、安装nodejs
1.下载安装包
curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -
2.执行安装命令
sudo apt-get install -y nodejs
二、安装yarn
1.安装
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
2.查看版本
yarn --version
3.查看当前设置的镜像源地址
yarn config get registry
4.修改源
yarn config set registry 'https://registry.npm.taobao.org'
END
版权声明:本文为cacique111原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。