If I do npm install
in my repository. I get the below error
npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY
npm ERR! errno UNABLE_TO_GET_ISSUER_CERT_LOCALLY
npm ERR! request to https://registry.npmjs.org/co failed, reason: unable to get local issuer certificate
I tried with
npm config set registry https://registry.npmjs.org/
But it does not solve the problem
Please help to resolve this issue. Thanks in advance!
This appears to be an issue with attempting to use SSL while installing your project's required packages. This occurs due to how you set your npm registry:
npm config set registry https://registry.npmjs.org/
Notice the https prefix in your npm registry, Hyper Text Transfer Protocol Secure (HTTPS) is the secure version of HTTP, the protocol over which data is sent between your browser and the website that you are connected to. The 'S' at the end of HTTPS stands for 'Secure'. It means all communications between your browser and the website are encrypted. HTTPS pages typically use one of two secure protocols to encrypt communications - SSL (Secure Sockets Layer) or TLS (Transport Layer Security).
Perhaps you can try the following to see if it resolves your issue:
npm config set registry http://registry.npmjs.org/
Then try reinstalling your dependencies with an npm install
Alternatively, you can turn off the ssl requirement (although use at your own discretion) by doing the following:
npm config set strict-ssl false
then try to install your requirements again with an npm install
I just had the same issue (just learning NodeJS for the first time). Turned out that I had a ZScaler issue. I disabled it for the download and it worked.
Removing package-lock.json file (and restarting build) solved this issue for me.
This is probably due to a proxy network. You can disable the proxy and run npm install
Or make sure you set the proxy configurations
npm config set https-proxy [address]:[port]
Then try npm install
again
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With