npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

SELF_SIGNED_CERT_IN_CHAIN Error while installing any package globally.

Whilte trying to install any package globally I keep getting following error:

npm ERR! request to failed, reason: self signed certificate in certificate chain

same error with npm login too

Kindly advice


Are you using a proxy server to access the internet?

Yes! It seems that I am behind a corporate proxy server.

I don’t have experience with npm behind a proxy, but the link to the troubleshooting topic is: Common proxy and networking problems

Ok! I will check it out.

Thank you.

Hi there,

There is no proxy but we have a Firewall implemented here. It’s name is SOPHOS XG210 (SFOS 17.1.3 MR-3) C23076R6DFFY9F6.

Kindly advice.

You need the firewalls root public key to use as a .pem file you point npm cafile config to then it’ll be happy with the signing chain to carry on.

And if you are on a laptop that leaves the corporate network, you need to make sure NPMs actual certificate is appended to that .pem file - Can NPM cafile add to trust store not replace it?

Hi Jack,

Thank you very much. But I did not understand clearly what it is that I need to do here. What do I need to request from guys who maintain firewall?

Thank you.

With warm regards,

Rupesh Bhurke