分享几段祖传的npm、yarn代码解决大部分下载依赖问题
npm
npm config set registry https://registry.npm.taobao.org
安装yarn
npm install -g yarn --registry=https://registry.npm.taobao.org
设置yarn
yarn config set registry https://registry.npm.taobao.org -g
yarn config set registry https://registry.npm.taobao.org --global
node-sass
yarn config set sass_binary_site http://cdn.npm.taobao.org/dist/node-sass -g
或者
set SASS_BINARY_SITE=https://npm.taobao.org/mirrors/node-sass/ && npm install node-sass
网友评论