关于npm和yarn的那些事儿

1.查询npm,yarn等下载包的源地址

npm config get registry

yarn config get registry

2.设置成国内淘宝镜像的地址(加快下载第三方包的速度,服务器在国内)

npm config set registry https://registry.npm.taobao.org

yarn config set registry https://registry.npm.taobao.org

3.使用yarn下载node-sass包失败的解决方法

yarn config set sass_binary_site http://cdn.npm.taobao.org/dist/node-sass -g

猜你喜欢

转载自www.cnblogs.com/webSong/p/12366791.html