Switch to using the officially-supported elasticsearch javascript client.