close

[Solved] npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY

I am facing the following error while Creating reactjs app: npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY in ReactJS. We are going to Learn about All Possible Solutions So Lets Get Start with This Article.

How npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY Error Occurs ?

I am facing the following error while Creating reactjs app.

npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY
npm ERR! unable to get local issuer certificate

So here I am writing all possible solutions that I have tried to resolve this error.

How To Solve npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY Error ?

  1. How To Solve npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY Error ?

    To Solve npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY Error Just follow this step. First of all Just Turn off strict SSL with the help of this command: npm config set strict-ssl=false Now, Change the registry by running this command: npm config set registry http://registry.npmjs.org/ Then, Change cafile setting with this command: npm config set cafile /path/to/your/cert.pem and then stop rejecting unknown CAs with this command: set NODE_TLS_REJECT_UNAUTHORIZED=0 now, your error must be solved.

  2. npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY

    To Solve npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY Error Here You just need to set registry in npm config to do so, Just run this command in your terminal: npm config set registry http://registry.npmjs.org And now, try to create reactjs project and Your error must be solved now. Thank You.

Solution 1: set registry

Here You just need to set registry in npm config to do so, Just run this command in your terminal.

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

And now, try to create reactjs project and Your error must be solved now. Thank You.

Solution 2: follow this step

Just follow this step. First of all Just Turn off strict SSL with the help of this command.

npm config set strict-ssl=false

Now, Change the registry by running this command.

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

Then, Change cafile setting with this command.

npm config set cafile /path/to/your/cert.pem

and then stop rejecting unknown CAs with this command.

set NODE_TLS_REJECT_UNAUTHORIZED=0

now, your error must be solved.

Summary

It’s all About this error. Hope We solved Your error. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also, Read

Leave a Comment