To fix Error: UNABLE_TO_VERIFY_LEAF_SIGNATURE during PhoneGap installation with Node, we disable the strict-ssl
option.
To do this, we run
npm config set strict-ssl false
to disable the strict-ssl
option to make npm accept untrusted SSL certificates.
Then we run
npm config set strict-ssl true
after installation to turn the certificate check back on.