![npm config set cafile windows npm config set cafile windows](https://miro.medium.com/max/2014/1*NNo5XfMT4-06qoUFTQ8HMg.png)
You may get an error like this: at bootstrapNodeJSCore.
![npm config set cafile windows npm config set cafile windows](https://i.stack.imgur.com/TTsCe.png)
Even setting a certificate file in npm, some installation packages rely on https libraries that don’t read npm settings. Sometimes, we have some problems when installing Node.js-based applications. Setting a certificate file npm config set cafile /path/to/your/cert.pem -global On Node.js On Node Package Manager you have two options: bypass or set a certificate file.īypassing (risky!) npm config set strict-ssl false -global If you don’t make it, you will probably get a Self-signed Certificate in Chain issue.Īfter understanding the idea behind Self-signed Certificates in Chain issue, let’s go through some setting. Thus you have to make the application believes that this self-signed is trusted as you load it in your operating system’s certificate manager or in the application API. Nevertheless, when you have a self-signed certificate, the certificate is emitted by your company or your own. The Certificate Manager from your machine should have a list of CAs that can be trusted. The certificate that comes with the package must be verified with a CA.
NPM CONFIG SET CAFILE WINDOWS CODE
You may have hackers trying to inject malicious code into your package. A package can go through a bunch of network nodes before it arrives in your machine. It means that the certificate attached to the package is a way to be sure that the package was not modified from the origin to the destination (your machine). So what are the risks with bypassing? The reason is that the packages come with a certificate and you should ensure that this certificate is valid so that you prevent the “man-in-the-middle” attack. SSL connection error screen on Google Chrome