Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

更换 npm registry/仓库源 #49

Open
409915016 opened this issue Nov 11, 2021 · 0 comments
Open

更换 npm registry/仓库源 #49

409915016 opened this issue Nov 11, 2021 · 0 comments

Comments

@409915016
Copy link
Owner

随着前端的蓬勃发展, NPM 包数据量和内容复杂度仍在不断地加速增长,CNPM 当年的架构已经很难满足当今的形势。

为了提供更稳定、更安全、更符合网站合规运营要求的镜像服务,我们今年启动了 CNPM 的优化工作:

启动新的域名。
Registry 全面重构,提升稳定性,降低同步失败率。
CLI 优化,提升安装速度,去掉软连接等带来的兼容性问题。
沉淀自企业级大规模应用的使用经验手册。
等等。。。

应该有不少开发者已经发现,访问淘宝 NPM 已经会自动 301 跳转到 npmmirror.com 新域名,这是我们独立注册和备案的域名。

Web 站点:https://npmmirror.com
Registry Endpoint:https://registry.npmmirror.com

随着新的域名已经正式启用,老 http://npm.taobao.orghttp://registry.npm.taobao.org 域名将于 2022 年 05 月 31 日零时起停止服务。

Web 站点 https://npmmirror.com

资源镜像地址替换成 https://npmmirror.com/mirrors/

仓库地址替换成 https://registry.npmmirror.com

替换项目根目录和系统 user 目录的 .yarnrc文件:

registry "https://registry.npmmirror.com"
disturl "https://npmmirror.com/dist"

sass_binary_site "https://npmmirror.com/mirrors/node-sass"
phantomjs_cdnurl "https://npmmirror.com/mirrors/phantomjs"
electron_mirror "https://npmmirror.com/mirrors/electron"
sqlite3_binary_host_mirror "https://npmmirror.com/mirrors/sqlite3"
profiler_binary_host_mirror "https://npmmirror.com/mirrors/node-inspector"
chromedriver_cdnurl "https://npmmirror.com/mirrors/chromedriver"
puppeteer_download_host "https://npmmirror.com/mirrors/puppeteer"
selenium_cdnurl "https://npmmirror.com/mirrors/selenium"

参考

409915016 added a commit that referenced this issue Nov 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant