-
Notifications
You must be signed in to change notification settings - Fork 726
Closed
Description
Since the last release of this module I am unable to use apiVersion 5.x. This still worked with the previous release. According to the documentation I would assume it should work.
Test code:
const elasticsearch = require('elasticsearch');
const client = new elasticsearch.Client({
hosts: ['localhost:9200'],
apiVersion: '5.x'
});
client.ping({
requestTimeout: 1000
}, function (error) {
if (error) {
console.trace('elasticsearch cluster is down!');
} else {
console.log('All is well');
}
});
The error is as follows:
TypeError: Cannot read property 'prototype' of undefined
at Object.<anonymous> (.../node_modules/elasticsearch/src/lib/apis/5_x.js:4990:31)
at Module._compile (module.js:569:30)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object.get 5.x [as 5.x] (.../elasticsearch/src/lib/apis/index.js:11:24)
at Object._.funcEnum (.../elasticsearch/src/lib/utils.js:343:20)
Metadata
Metadata
Assignees
Labels
No labels