最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - npm request failed, reason: self signed certificate in certificate chain - Stack Overflow

programmeradmin0浏览0评论

I am trying to run Expo react-native project from here

npm install expo -g
expo init AwesomeProject
npm start

But on running npm start i am getting this error

npm ERR! code SELF_SIGNED_CERT_IN_CHAIN
npm ERR! errno SELF_SIGNED_CERT_IN_CHAIN
npm ERR! request to .0.0.tar.gz failed, reason: self signed certificate in certificate chain

i tried the following mands as stated here

npm config set registry /

But it didnt help. I dont want to disable strict SSL. As stated.Can someone suggest?

I am trying to run Expo react-native project from here

npm install expo -g
expo init AwesomeProject
npm start

But on running npm start i am getting this error

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

i tried the following mands as stated here

npm config set registry http://registry.npmjs/

But it didnt help. I dont want to disable strict SSL. As stated.Can someone suggest?

Share Improve this question edited Jan 29, 2020 at 6:31 manish kumar asked Jan 29, 2020 at 6:18 manish kumarmanish kumar 4,7004 gold badges39 silver badges52 bronze badges 8
  • No actually. You realised my pain. So cool to see people taking efforts to share google search query. – manish kumar Commented Jan 29, 2020 at 6:30
  • Does this answer your question? nodejs "npm ERR! code SELF_SIGNED_CERT_IN_CHAIN" – Prakash Karena Commented Jan 29, 2020 at 6:30
  • I have mentioned that link in the post. and no – manish kumar Commented Jan 29, 2020 at 6:33
  • 1 I guess it has something to do with the expo repo on github. ill raise a issue on the github in sometime. – manish kumar Commented Jan 29, 2020 at 6:33
  • With 2400 answers, it was a reasonable idea that perhaps there was something out there. Just trying to help... – mplungjan Commented Jan 29, 2020 at 6:33
 |  Show 3 more ments

2 Answers 2

Reset to default 1

Set in mand prompt or terminal (mac OS)

set NODE_TLS_REJECT_UNAUTHORIZED=0

then, install your packages or npm install

Like moreshwar dalvi says. Works for me, but on a project created from npx create-expo-app, not from npx create-expo-app@latest.

发布评论

评论列表(0)

  1. 暂无评论