1.I downloaded node ( latest v4.6.0)
-
Does this answer your question? [npm ERR! code UNABLE\_TO\_GET\_ISSUER\_CERT\_LOCALLY](https://stackoverflow.com/questions/45884752/npm-err-code-unable-to-get-issuer-cert-locally) – Krishna Kishore Oct 19 '21 at 10:40
3 Answers
I could not get any help from google(people said downgrade to v0.x) but a colleague helped ..
npm set strict-ssl=false
This helped ...
I am posting this question and answer for helping people who come across the same error

- 9,349
- 16
- 86
- 148

- 615
- 1
- 6
- 13
To list all the possible solutions that could be affecting this issue:
Don't enforce SSL (this could work on it's own):
npm config set strict-ssl=false
If that doesn't work, perhaps try adding this (change registry to non-HTTPS URL):
npm config set registry http://registry.npmjs.org/
It might be that your company enforces its own certificate authority (usually using ZScaler), in which case there will be some company documentation to get the certificate file (On mac, use KeyChain and export to PEM, on Windows, run certmgr
and export to base64 CER), and then set the cafile to that exported file using:
npm config set cafile /path/to/your/cert.pem
It could also be that the install command runs a node lib\install.js
type command within, in which case, disable that failure using:
set NODE_TLS_REJECT_UNAUTHORIZED=0
(In Windows, use export
instead of set
, and there's also the option to specify export NODE_EXTRA_CA_CERTS=[/path/to/your/cert.pem]
instead of disabling it)
Try installing in between all of these steps in case you're not sure what is actually going on.

- 105
- 1
- 1
- 10

- 69
- 3