0

I want to install react on vs code i have already install node js but it showing me npm error i dont know how to solve this issue. Here is the Screenshot enter image description here of error please help i tried somw ways by searching but couldnt resolve the issue .

I tried some commands like

npx create-react-app my-app
cd my-app
npm start

am expecting solution for the error which i am not able to solve. here is the 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/create-react-app failed, reason: unable to get local issuer certificate

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Dev\npm-repository\npm-cache\_logs\2022-12-15T19_15_44_004Z-debug-0.log 

1 Answers1

0

I found two feasible solutions in this question

I'd recommend you to try this two different solutions.

  1. Run npm config list

    /path/to/global/.npmrc
    NODE_EXTRA_CA_CERTS = "./certs/chain.pem"
    

    Remove the last line and then npm install

  2. Add proxy=http://gateway.zscaler.net:80/ to the end of c:\Users\$USERNAME\npm\.npmrc

There's also other solutions that disable ssl protection but that is risky and isn't recommended.