本文介绍: npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLYnpm ERR! errno UNABLE_TO_GET_ISSUER_CERT_LOCALLY

Talk is cheap, show me the code.

环境 | Environment

k version
OS windows 11
node v18.14.2
npm 9.5.0

报错日志 | Error log

>npm create vite@latest
Need to install the following packages:
  create-vite@5.0.0
Ok to proceed? (y) y
npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY
npm ERR! errno UNABLE_TO_GET_ISSUER_CERT_LOCALLY
npm ERR! request to https://cdn.npmmirror.com/packages/create-vite/5.0.0/create-vite-5.0.0.tgz failed, reason: unable to get local issuer certificate

npm ERR! A complete log of this run can be found in:
npm ERR!     C:UserstanpenggoodAppDataLocalnpm-cache_logs2023-11-22T02_46_11_530Z-debug-0.log

解决方案 | Solution

npm 项目中,发现类似的 [ISSUE #14667],并在 issue 的最后找到了解决方案。

npm config set strict-ssl false

参考 | References

CSDN – 安装npm包的时候出现unable to get local issuer certificate的错误解决办法

https://github.com/npm/npm/issues/14667

https://docs.npmjs.com/misc/config

相关问题 | Related

CSDN – git 报错SSL certificate problem: unable to get local issuer certificate解决办法

git config http.sslverify false

原文地址:https://blog.csdn.net/AV_woaijava/article/details/134549709

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。

如若转载,请注明出处:http://www.7code.cn/show_2879.html

如若内容造成侵权/违法违规/事实不符,请联系代码007邮箱:suwngjj01@126.com进行投诉反馈,一经查实,立即删除

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注