由于SELF_SIGNED_CERT_IN_CHAIN,Expo无法更新npm软件包 [英] Expo cannot update npm packages due to SELF_SIGNED_CERT_IN_CHAIN

查看:127
本文介绍了由于SELF_SIGNED_CERT_IN_CHAIN,Expo无法更新npm软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Expo for Native Native要求对react-native的依赖项的格式如下:

Expo for React Native requires the dependency for react-native to be formatted like this:

"dependencies": {
    "expo": "^30.0.1",
    "react": "16.3.1",
    "react-native": "https://github.com/expo/react-native/archive/sdk-30.0.0.tar.gz"
}

当我使用npm install更新节点程序包时,出现以下错误

When I use npm install to update node packages, I get the following error

npm ERR! code SELF_SIGNED_CERT_IN_CHAIN
npm ERR! errno SELF_SIGNED_CERT_IN_CHAIN
npm ERR! request to https://github.com/expo/react-native/archive/sdk-30.0.0.tar.gz failed, reason: self signed certificate in certificate chain

这仅发生在我的博览会项目中.我可以在其他节点项目中使用npm install而不会出现任何自签名证书问题.

This only happens in my expo projects. I can use npm install without any self signed certificate issues in other node projects.

如何删除自签名证书?否则,如何解决此错误而不完全禁用SSL?

How can I remove the self signed certificate? Otherwise how can I solve this error without disabling SSL completely?

我已经尝试过npm config set ca ""并将npm升级到最新版本.

I have already tried npm config set ca "" as well as upgrading npm to the latest version.

推荐答案

尝试一下. 唯一的解决方案

try this. the only solution

npm set strict-ssl false

这篇关于由于SELF_SIGNED_CERT_IN_CHAIN,Expo无法更新npm软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆