安装yarn

1、使用npm命令全局安装

npm install -g yarn //安装完毕可以使用yarn --version查看yarn版本号

2、加入系统环境变量Path中

C:\Users\admin\AppData\Local\Yarn\bin

3、包数据源更换为淘宝镜像

yarn config set registry https://registry.npm.taobao.org
因为使用yarn安装模块时可能出现There appears to be trouble with your network connection. Retrying...
posted @ 2020-03-05 17:20  豫秦  阅读(582)  评论(0)    收藏  举报