Error code

Node.js ERR_TLS_CERT_ALTNAME_INVALID

NODE.JSERR_TLS_CERT_ALTNAME_INVALID
Runtime Error Code· An error code from a programming runtime or package manager, like Node.js or npm.

What it means

The hostname does not match any Subject Alternative Name in the TLS certificate presented by the server.

How to fix it

  1. Verify you are connecting to the correct hostname.
  2. Obtain or renew a certificate that includes the correct SANs.
  3. Do not set rejectUnauthorized:false in production — fix the certificate instead.

Not affiliated with Node.js. Answer summarized from the manufacturer's manual linked above; consult that source for the authoritative procedure.