赞
踩
淘宝为了提供更稳定、更安全、更符合国家法律法规要求的镜像服务(说人话就是怕国家找茬所以要低调),将要更换淘宝 npm 源的服务器,并且老的域名 npm.taobao.org 和 registry.npm.taobao.org 将不再使用。
2022 年 5 月 31 日 0 时,这两个老域名将会停止服务,截至目前,通过老域名安装 npm 包已经会被 301 到新域名 registry.npmmirror.com
淘宝 NPM 镜像站切换新域名啦
- 1.通过cnpm使用淘宝镜像:
-
- npm install -g cnpm --registry=https://registry.npmmirror.com
-
- 2.将npm设置为淘宝镜像:
-
- npm config set registry https://registry.npmmirror.com
-
- 3.将yarn设置为淘宝镜像
-
- yarn config set registry https://registry.npmmirror.com
-
- 4解决node-sass无法下载下来的问题
-
- yarn config set sass_binary_site https://cdn.npmmirror.com/dist/node-sass
-
- 5. 查看cnpm镜像设置:
-
- cnpm config get registry
-
- 6.查看npm镜像设置:
-
- npm config get registry
-
- 7.查看yarn镜像设置:
-
- yarn config get registry

Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。