npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY

C:\Users\Asish>npm install -g @angular/cli
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/@angular%2fcli failed, reason: unable to get local issuer certificate

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Asish\AppData\Roaming\npm-cache_logs\2021-03-25T03_27_01_781Z-debug.log

Solution: – Set the registry with http url as shown below.

npm config set registry http://registry.npmjs.org/

Add Comment