yarn安装和配置国内源
我的是ubuntu系统,Windows系统的话可以直接前往yarn的官网下载安装包步骤如下sudo apt updatesudo apt install -y nodejssudo apt install -y npmsudo npm i -g yarn --registry http://mirrors.cloud.tencent.com/npm/yarn config set -g regis
·
我的是ubuntu系统,Windows系统的话可以直接前往yarn的官网下载安装包
$ cat /etc/issue
Ubuntu 20.10 \n \l
用的是ubuntu20,换源请看这 ubuntu 换源
步骤如下
sudo apt update
sudo apt install -y nodejs # 安装nodejs
sudo apt install -y npm # 安装npm
export N_S='http://mirrors.cloud.tencent.com/npm/'
sudo npm i -g npm --registry $N_S
sudo npm i -g yarn --registry $N_S
npm config set registry $N_S
yarn config set -g registry $N_S
yarn config set -g sass_binary_site ${N_S}node-sass/
如果是Windows的话,可用这样配置yarn使用腾讯云源
yarn config set -g registry http://mirrors.cloud.tencent.com/npm/
yarn config set -g sass_binary_site http://mirrors.cloud.tencent.com/npm/node-sass/
更多推荐
已为社区贡献1条内容
所有评论(0)