node.js - 由于 SELF_SIGNED_CERT_IN_CHAIN,Expo 无法更新 npm 包
问题描述
Expo for React Native 要求 react-native 的依赖格式如下:
"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
更新节点包时,我收到以下错误
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 而没有任何自签名证书问题。
如何删除自签名证书?否则如何在不完全禁用 SSL 的情况下解决此错误?
我已经尝试npm config set ca ""
过以及将 npm 升级到最新版本。
解决方案
尝试这个。唯一的解决方案
npm set strict-ssl false
推荐阅读
- intellij-idea - 当我在 IntelliJ Idea Ultimate 中更改模块时,FTP 部署选项不显示
- gcc - 如何使用abspath链接.so?
- javascript - 如何在 Angular 上使用 Highchart?
- angular - 无法在验证器中读取表单组值
- java - CompletableFuture 和垃圾收集
- amazon-web-services - 无法从 AWS CLI/控制台/开发工具包通过 AWS SNS 发送文本消息
- jenkins-plugins - 自定义 Jenkins 插件在重新配置作业时不记得它自己的变量
- google-cloud-platform - 需要帮助配置 Stackdriver 警报的条件
- reactjs - 如何为 Material-ui TextField Type=date 设置默认日期
- symfony - 如何更改实体中的数据库列类型