问题
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"
}
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
This only happens in my expo projects. I can use npm install without any self signed certificate issues in other node projects.
How can I remove the self signed certificate? Otherwise how can I solve this error without disabling SSL completely?
I have already tried npm config set ca ""
as well as upgrading npm to the latest version.
回答1:
try this. the only solution
npm set strict-ssl false
来源:https://stackoverflow.com/questions/52695693/expo-cannot-update-npm-packages-due-to-self-signed-cert-in-chain