npm报错:request to https://registry.npm.taobao.org failed, reason certificate has expired
nbstudy 发表于 2024-08-31 11:37:06
最新一个老项目,在使用 npm install
时, 总是报错:
npm报错:request to https://registry.npm.taobao.org failed, reason certificate has expired
很明显原因是淘宝镜像过期了!
通过npm config get registry
查询本地的npm镜像:
bash
apple@AppledeMacBook-Pro h5 % npm config get registry
https://registry.npmmirror.com/
发现明明已经切换到新的镜像了啊,为什么还是报错呢?
原因是项目本地的package-lock.json
文件导致的,删除即可。