Node JS UNABLE_TO_GET_ISSUER_CERT_LOCALLY error while accessing https url

We are experiencing error={"code":"UNABLE_TO_GET_ISSUER_CERT_LOCALLY"} when accessing https url from the node js application.

Issue seems to be related to CA cert file validation and the below solutions have been tried.

1) node env configuration NODE_EXTRA_CA_CERTS added Result : Does not work Requires node 7.3+ to work

2) setting the cafile in .npmrc - “npm config set cafile=path_to_cert” Result : Did not work

3) Solution tried: Starting the SSL server with the root CA cert Result : Did not work

4) We dont want to use npm set strict-ssl=false

Node version used: v5.3.0 npm version used: 3.3.12

Please let us know if anyone else had faced this issue or aware of any configuration that would fix the issue.

728x90

0 Answers Node JS UNABLE_TO_GET_ISSUER_CERT_LOCALLY error while accessing https url