node.jsreactjsnpmcreate-react-app

npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY


I am trying all possible ways to create a React application. I have tried Maven, and now I am trying create-react-app from Facebook Incubators.

When I tried to run the command create-react-app my-app in npm environment, it worked on my personal system with no issues. But, when I tried the same command in my work environment, I encountered the following error on my command line:

npm ERR! node v6.10.2
npm ERR! npm  v3.10.10
npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY

npm ERR! unable to get local issuer certificate
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

Solution

  • A quick solution from the internet search was npm config set strict-ssl false, luckily it worked. But as a part of my work environment, I am restricted to set the strict-ssl flag to false.

    Later I found a safe and working solution,

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

    this worked perfectly and I got a success message Happy Hacking! by not setting the strict-ssl flag to false.