npm ERR! errno UNABLE_TO_VERIFY_LEAF_SIGNATURE
npm ERR! request to https://registry.npmjs.org/cra-template failed, reason: unable to verify the first certificate
I got this error while running npx create-react-app ./ or other else command using **npm **install.
I have had never before such an error.
Should i set environmental variable or something? I’m working on Windows.
Turning of firewall woTurning of firewall works, but i don’t want to do it every time.rks, but i don’t want to do it every time.
2
Answers
It might be related to the ESET Antivirus update if you use ESET.
See the forum post here: https://forum.eset.com/topic/40702-eset-ssl-protection-produces-an-invalid-certificate-chain-for-nodejs-apps/
There’s various attempts to work around it in the post but I’m not having much joy myself.
It’s the last ESET update:
https://forum.eset.com/topic/40702-eset-ssl-protection-produces-an-invalid-certificate-chain-for-nodejs-apps/
You can fix it temporarily and ESET will fix it permanently with an update. So whatever you do, you should undo it later.
Quick fix:
You could also disable SSL entirely on ESET, but is better to just disable what has the issue. Just remember to re-enable it later, once ESET rolls out the fix-update.
There are other ways to fix it temporarily (waiting for ESET official update):