当前位置:   article > 正文

淘宝 npm 源将在 2022 年 5 月 31 日更换域名服务_如何查看淘宝镜像截止时间

如何查看淘宝镜像截止时间

淘宝为了提供更稳定、更安全、更符合国家法律法规要求的镜像服务(说人话就是怕国家找茬所以要低调),将要更换淘宝 npm 源的服务器,并且老的域名 npm.taobao.org 和 registry.npm.taobao.org 将不再使用。
2022 年 5 月 31 日 0 时,这两个老域名将会停止服务,截至目前,通过老域名安装 npm 包已经会被 301 到新域名 registry.npmmirror.com
淘宝 NPM 镜像站切换新域名啦

  1. 1.通过cnpm使用淘宝镜像:
  2. npm install -g cnpm --registry=https://registry.npmmirror.com
  3. 2.将npm设置为淘宝镜像:
  4. npm config set registry https://registry.npmmirror.com
  5. 3.将yarn设置为淘宝镜像
  6. yarn config set registry https://registry.npmmirror.com
  7. 4解决node-sass无法下载下来的问题
  8. yarn config set sass_binary_site https://cdn.npmmirror.com/dist/node-sass
  9. 5. 查看cnpm镜像设置:
  10. cnpm config get registry
  11. 6.查看npm镜像设置:
  12. npm config get registry
  13. 7.查看yarn镜像设置:
  14. yarn config get registry

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/从前慢现在也慢/article/detail/212298
推荐阅读
相关标签
  

闽ICP备14008679号