Also setting NODE_EXTRA_CA_CERTS in your environment variables would solve the problem, according to this post:
NODE_EXTRA_CA_CERTS