淘宝镜像站
在项目下创建 .npmrc 和 .yarnrc
.npmrc 文件如下
; 将当前文件放到 C:\Users\用户名\目录下
loglevel=http
progress=false
registry=https://registry.npmmirror.com
sass_binary_site=https://registry.npmmirror.com/mirrors/node-sass/
phantomjs_cdnurl=https://registry.npmmirror.com/mirrors/phantomjs/
electron_mirror=https://registry.npmmirror.com/mirrors/electron/
profiler_binary_host_mirror=https://registry.npmmirror.com/mirrors/node-inspector/
chromedriver_cdnurl=https://registry.npmmirror.com/mirrors/chromedriver
sentrycli_cdnurl=https://npmmirror.com/mirrors/sentry-cli/
canvas_binary_host_mirror=https://registry.npmmirror.com/mirrors/node-canvas-prebuilt/
sqlite3_binary_host_mirror=https://registry.npmmirror.com/-/binary/
node_sqlite3_binary_host_mirror=https://registry.npmmirror.com/-/binary/
.yarnrc 文件如下
registry "https://registry.npmmirror.com"
sass_binary_site "https://registry.npmmirror.com/mirrors/node-sass"
phantomjs_cdnurl "https://registry.npmmirror.com/mirrors/phantomjs"
electron_mirror "https://registry.npmmirror.com/mirrors/electron/"
profiler_binary_host_mirror "https://npmmirror.com/mirrors/node-inspector/"
chromedriver_cdnurl "https://registry.npmmirror.com/mirrors/chromedriver"
sentrycli_cdnurl "https://registry.npmmirror.com/mirrors/sentry-cli/"
sqlite3_binary_host_mirror "https://registry.npmmirror.com/-/binary/"
node_sqlite3_binary_host_mirror "https://registry.npmmirror.com/-/binary/"