源镜像地址:https://registry.npm.taobao.org/
新镜像地址:https://registry.npmmirror.com
替换命令:npm config set registry https://registry.npmmirror.com
nvm中,镜像过期日志如下:
Could not retrieve https://npm.taobao.org/mirrors/node/index.json.
Get "https://npm.taobao.org/mirrors/node/index.json": tls: failed to verify certificate: x509: certificate has expired or is not yet valid:
修改nvm配置文件(settings.txt)
# 配置node镜像:
node_mirror: https://npmmirror.com/mirrors/node/# 配置npm镜像:
npm_mirror: https://npmmirror.com/mirrors/npm/