npm config set strict-sslfalse Option 2: Load in CA cert, like postman (useful for testing with TLS). I moved my root certificate file to ~/.certs and pointed npm at it like so: npm config set cafile ~/.certs/root.pemĪll credit to the NPM Wiki for this solution. This instructs Node to allow untrusted certificates (untrusted not verified by a certificate authority) If you dont want to set an environment variable or need to do this for multiple applications npm has a strict-ssl config you set to false. While I could have tried adding my root certificate to npm's global store, I decided to use npm's built in facilities to do the job. This makes sense as npm has it’s own certificate store, which my intercepting root certificate 2 did not get added to. The failure led to the following message being printed out:: silly fetchPackageMetaData error for request to failed, reason: unable to verify the first certificateĪpparently npm was unable to verify the certificate. This setting, along with cafile, cert and strict-ssl, are seldom used. After I checked the log file at ~/.npm/_logs/T04_08_03_137Z-debug.log I found out some a potential culprit. For example, you can run npm config set access public to make the publishing. While trying to install an npm package the other day I ran into some errors. tld: port If your proxy requires a certificate file, you can provide a path to it as follows: npm config set. tld: port npm config set https-proxy http: / / user: pwd domain. Strangely, I was looking at the documentation for ca and couldn't figure out how to use it to set a new ca, and all the references for npm config set ca were to set it to '' or null, to get around the CA switch back in February. Use NPM config (Linux, macOS, Windows) To use NPM-level configuration, run the following commands in your terminal: npm config set proxy http: / / user: pwd domain. So, I have TLS 1 inspection happening for some machines on my home network, including my development machine are among the machines where I allow this to happen. othiym23 - thanks for the pointer to cafile, I think that might do the trick for me.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |