HarmoneyOS项目编译构建提示certificate has expired

文章讲述了在HarmoneyOS项目中遇到的certificatehasexpired编译错误,原因是npm源的SSL证书过期。提供了解决方案,即更换npm源至如阿里云、腾讯云等镜像,以及设置新的registry地址。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

问题描述

HarmoneyOS项目编译构建提示certificate has expired

原因分析:

npm源地址ssl证书过期,
https://registry.npm.taobao.org/这个以前淘宝源提示过期,
更换个别的源就行了


解决方案:

更换npm源

查看当前源 npm config get registry
更换为新的源 npm config set registry https://registry.npmmirror.com

其他源地址

npm 官方原始镜像网址是:https://registry.npmjs.org/
阿里云 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/
腾讯,华为,阿里的镜像站基本上比较全

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值