npm “https://registry.npm.taobao.org/...: certificate has expired“(证书已过期) 解决方法

今天在使用npm下载依赖的时候出现淘宝镜像证书过期问题

error An unexpected error occurred: "https://registry.npm.taobao.org/axios: certificate has expired"

原因: 淘宝镜像原地址2024年1月22日已过期

解决: 解决方法就是切换淘宝最新镜像地址,执行完成之后就可以正常下载依赖了

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

其他镜像源

javascript 复制代码
   
   
   
    
* 
       
       
       
        
        
        
       
       
       

       
       
       

        
        
        
         
         npm 官方原始镜像网址是:
         
         https:
         
         //registry.npmjs.org/
        
        
        
       
       
       

    
* 
       
       
       
        
        
        
       
       
       

       
       
       

        
        
        
         
         淘宝最新 
         
         NPM 镜像:
         
         https:
         
         //registry.npmmirror.com
        
        
        
       
       
       

    
* 
       
       
       
        
        
        
       
       
       

       
       
       

        
        
        
         
         阿里云 
         
         NPM 镜像:
         
         https:
         
         //npm.aliyun.com
        
        
        
       
       
       

    
* 
       
       
       
        
        
        
       
       
       

       
       
       

        
        
        
         
         腾讯云 
         
         NPM 镜像:
         
         https:
         
         //mirrors.cloud.tencent.com/npm/
        
        
        
       
       
       

    
* 
       
       
       
        
        
        
       
       
       

       
       
       

        
        
        
         
         华为云 
         
         NPM 镜像:
         
         https:
         
         //mirrors.huaweicloud.com/repository/npm/
        
        
        
       
       
       

    
* 
       
       
       
        
        
        
       
       
       

       
       
       

        
        
        
         
         网易 
         
         NPM 镜像:
         
         https:
         
         //mirrors.163.com/npm/
        
        
        
       
       
       

    
* 
       
       
       
        
        
        
       
       
       

       
       
       

        
        
        
         
         中科院大学开源镜像站:
         
         http:
         
         //mirrors.ustc.edu.cn/
        
        
        
       
       
       

    
* 
       
       
       
        
        
        
       
       
       

       
       
       

        
        
        
         
         清华大学开源镜像站:
         
         https:
         
         //mirrors.tuna.tsinghua.edu.cn/
        
        
        
       
       
       

    
* 
       
       
       
        
        
        
       
       
       

       
       
       

        
        
        
         
         腾讯,华为,阿里的镜像站基本上比较全
        
        
        
       
       
       

   

   
   
   
相关推荐
人工智能训练师4 小时前
Ubuntu22.04如何安装新版本的Node.js和npm
linux·运维·前端·人工智能·ubuntu·npm·node.js
Seveny074 小时前
pnpm相对于npm,yarn的优势
前端·npm·node.js
yddddddy5 小时前
css的基本知识
前端·css
昔人'5 小时前
css `lh`单位
前端·css
Nan_Shu_6147 小时前
Web前端面试题(2)
前端
知识分享小能手7 小时前
React学习教程,从入门到精通,React 组件核心语法知识点详解(类组件体系)(19)
前端·javascript·vue.js·学习·react.js·react·anti-design-vue
蚂蚁RichLab前端团队8 小时前
🚀🚀🚀 RichLab - 花呗前端团队招贤纳士 - 【转岗/内推/社招】
前端·javascript·人工智能
孩子 你要相信光8 小时前
css之一个元素可以同时应用多个动画效果
前端·css
huangql5209 小时前
npm 发布流程——从创建组件到发布到 npm 仓库
前端·npm·node.js
Days20509 小时前
LeaferJS好用的 Canvas 引擎
前端·开源