The error SELF_SIGNED_CERT_IN_CHAIN means that you have self signed certificate in certificate chain which is basically not trusted by the system.
Most of these tools have an option to disable strict SSL certificate checking, which let you get around the problem: npm config strict-ssl false. git config --global http. sslverify false.
If you're behind the corporate proxy (which uses e.g. Blue Coat), you should use http instead of https for repository addresses, e.g.
npm config set registry="http://registry.npmjs.org/"
See: Error: SSL Error: SELF_SIGNED_CERT_IN_CHAIN while using npm.
You can also import failing self-certificate into your system and mark as trusted, or temporary disable SSL validation while installing packages (quick, but not recommended method):
npm config set strict-ssl false
See: Error: SSL Error: SELF_SIGNED_CERT_IN_CHAIN while using npm.
The recommended way (and more painful) is just to point to the right certificate file, e.g.
npm config set cafile "<path to your certificate file>"
See: How to fix SSL certificate error when running Npm on Windows?.
This works for me:
$ export NODE_TLS_REJECT_UNAUTHORIZED=0
$ npm install
Use this command below and it could work fine:
npm config set registry="http://registry.npmjs.org/"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With