A clear and concise description of what the bug is.
Steps to reproduce the behavior:
Paste your code here:
const client6 = new elastic.Client({ node: "http://127.0.0.1:9200" });

@elastic/elasticsearch version: >=6.0.0Hello! From the log it seems that you are using the client from the browser, am I right?
In such case, there is no official support for the browser since expose your Elasticsearch instance to the rest of the world will cause you security issues eventually.
I recommend you to write a lightweight proxy that uses this client instead.
so does it mean it won't work with Angular app?
@alishah730 correct. The client is not intended to be used in a browser environment, and we highly discourage you to connect to Elasticsearch directly form the browser, see https://github.com/elastic/elasticsearch-js/issues/1066.