NPM 仓库切换淘宝源

淘宝镜像站

https://npmmirror.com/

在项目下创建 .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/"
最后修改:2023 年 10 月 08 日 05 : 47 PM

发表评论