使用 npm install 时出现 SELF_SIGNED_CERT_IN_CHAIN 错误 [英] SELF_SIGNED_CERT_IN_CHAIN error while using npm install

查看:169
本文介绍了使用 npm install 时出现 SELF_SIGNED_CERT_IN_CHAIN 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我运行 npm install 时,我都会收到一个错误

Whenever I run npm install , I get an error

错误:SELF_SIGNED_CERT_IN_CHAIN.

Error: SELF_SIGNED_CERT_IN_CHAIN.

如何解决这个错误?

推荐答案

我以前也遇到过这个错误.请尝试以下步骤.

Even I used to get this error. Try following steps.

克服此错误应遵循的步骤:

Steps to be followed to overcome this error:

1) 按顺序运行这三个命令.

1) Run these three commands in a sequence.

  • npm 配置设置strict-ssl false

  • npm config set strict-ssl false

npm 更新 npm –g

npm update npm –g

npm config set strict-ssl true

npm config set strict-ssl true

2) 使用以下命令在 npm 配置中设置属性代理和 https-proxy:

2) Set properties proxy and https-proxy in the npm config using these commands:

  • npm config set proxy="http://"proxy-name":8080"

  • npm config set proxy="http://"proxy-name":8080"

npm 配置集 https-proxy="http://"proxy-name":8080"

npm config set https-proxy="http://"proxy-name":8080"

然后尝试使用您尝试过的命令安装您的软件包.

Then try installing your packages using commands you tried.

希望这会有所帮助.

这篇关于使用 npm install 时出现 SELF_SIGNED_CERT_IN_CHAIN 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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