Uncaught TypeError: self.on is not a function when trying to connect
Opened this issue · 4 comments
simtrax commented
I get an error when trying to connect to ES on AWS.
Using this code supplied in the readme:
var es = require('elasticsearch').Client({
hosts: 'https://amazon-es-host.us-east-1.es.amazonaws.com',
connectionClass: require('http-aws-es'),
amazonES: {
region: 'us-east-1',
accessKey: 'AKID',
secretKey: 'secret'
}
});
I guess it's a dependency that does not work as intended.
mrobinson537 commented
I am experiencing the same issue.
johnnyfreeman commented
+1
I'm guessing the reason is this connector is designed to work from the server and not the browser?
mgsterling11 commented
I am experiencing this issue as well. I have a basic browser-based react app (through create-react-app: https://github.com/facebookincubator/create-react-app) with no node backend. does the client need to be established on the server?
florianbepunkt commented
@simtrax @mgsterling11 @johnnyfreeman @Matterful Has anyone of you been able to solve this issue? I experience the same with my react app. No idea how to work around this… any help would be appreciated.