Until a few years ago, when npm for instance announced that they would no longer support self-signed certificates. This means that the certificate verification process was no longer automatic. So developers now have to set up their application to see the self-signed certificates.

How do I fix self-signed certificate in the certificate chain?

Depending on the tool you’re using, there are a few recommendations. Some are risky, some are safe. One thing is clear, though: you should not attempt to disable the certification verification process altogether.

For Node.js

You can insert an environment variable to allow untrusted certificates using the following command at the beginning of the code: This is risky and it’s not recommended to be used in production. Alternatively, use npm config set strict-ssl=false if you have to do this for many applications and you want to save repeating the process. Users also suggest upgrading your version of Node, to fixes any existing bugs and vulnerabilities.

For npm

The recommended solution is, again, to upgrade your version of npm running one of the following: npm install npm -g –ca=null  npm update npm -g Or,  tell your current version of npm to use known registrars, and after installing, stop using them: Some users mentioned that they only switched the registry URL from https to http: We hope that one of these suggestions helped you fix the problem. Should you have any recommendations, please use the comments section below.

Name * Email * Commenting as . Not you? Save information for future comments
Comment

Δ