3

I need to install Express Framework for my application.
This is the error which I am obtaining. I tried to set Environment varaibales for my computer towards npm as http://username:password@proxy:port for both http and https.

Also, I have tried the code such as

npm config set proxy http://username:password@proxy:port -g
npm config set https-proxy http://username:password@proxy:port -g
npm config set strict-ssl false.

Even then I am getting the below error.

 npm ERR! node v0.12.7
    npm ERR! npm  v2.11.3
    npm ERR! code UNABLE_TO_VERIFY_LEAF_SIGNATURE

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

    npm ERR! Please include the following file with any support request:

Any help regarding installing Express Framework would be appreciated.

Surya
  • 628
  • 3
  • 9
  • 26
  • It seems like this was answered here: http://stackoverflow.com/questions/20082893/unable-to-verify-leaf-signature – Gadi Aug 12 '15 at 15:31

5 Answers5

8

I have also faced same problem, but your last option i.e.

npm config set strict-ssl false worked for me.

after run this command in command prompt I installed express framework with following command:

npm install -g express-generator

Prateek Naik
  • 2,522
  • 4
  • 18
  • 38
rasa
  • 116
  • 4
0

Even I got the same error while installing angular cli... I have used the command "npm config set strict-ssl false" in cmd and then installed using npm install -g @angular/cli...It worked...Thanks

0

npm config set strict-ssl false should fix it.

0

In my case it was in a docker environment and I did not copied the .yarnrc that included the sstrict-ssl false directive to the image in the build phase.

elpddev
  • 4,314
  • 4
  • 26
  • 47
0

Issue:

>npm install
npm ERR! code UNABLE_TO_VERIFY_LEAF_SIGNATURE
npm ERR! errno UNABLE_TO_VERIFY_LEAF_SIGNATURE
npm ERR! request to https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.7.6.tgz failed, reason: unable to verify the first certificate

Solution:

npm install worked after executing this command:

npm config set strict-ssl false
bguiz
  • 27,371
  • 47
  • 154
  • 243
Raghu
  • 1