淘宝镜像的https证书过期

npm error errno CERT_HAS_EXPIRED

npm error request to https://registry.npm.taobao.org/util/download/util-0.10.4.tgz?cache=0\&sync_timestamp=1562337713422\&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Futil%2Fdownload%2Futil-0.10.4.tgz f ailed, reason: certificate has expired

解决方案:

1 清空缓存

复制代码
npm cache clean --force

2 查看当前的npm镜像设置

复制代码
npm config get registry

3 切换新源

复制代码
npm config set registry https://registry.npmmirror.com

4 查看新源是否设置成功

复制代码
npm config get registry
复制代码

5 可以正常安装需要的工具了

复制代码
npm insatll
相关推荐
一只小姜丝3321 小时前
解决各大浏览器中http地址无权限调用麦克风摄像头问题
网络·vue.js·网络协议·http
hgdlip9 小时前
如果更换ip地址会怎么样?网络ip地址怎么更换
网络·网络协议·tcp/ip
m0_748252389 小时前
Node.js HTTP模块详解:创建服务器、响应请求与客户端请求
服务器·http·node.js
m0_7482365811 小时前
Nginx中$http_host、$host、$proxy_host的区别
运维·nginx·http
刘大猫2612 小时前
九、MyBatis动态SQL
人工智能·神经网络·网络协议
Ljw...13 小时前
HTTP
linux·网络·网络协议·http
追风赶月、13 小时前
【网络】HTTPS协议原理
网络·网络协议·https
桃酥40315 小时前
8、HTTP/1.0和HTTP/1.1的区别【高频】
网络·http
xing.yu.CTF17 小时前
4.3MISC流量分析练习-wireshark-https
测试工具·https·wireshark