How do I fix an error ConfigurationError: Missing node(s) option . Se the discripton here https://stackoverflow.com/q/58371284/8236354
Hi, Stein.
Looking at the stack trace you posted in StackOverflow, I see that the error happens in the creation of the Elasticsearch client:
systemtest/step-definition/multiplier.js:7 ConfigurationError: Missing node(s) option at new Client
(/Users/steinkorsveien/Development/Cucumber/cucumber2/node_modules/@elastic>/elasticsearch/index.js:52:13) at new Elasticsearch
Your code has:
var esTransportOpts = {
level: 'info'
}
And:
winston.createLogger({
transports: [
new Elasticsearch(esTransportOpts)
]
})
I don't really know anything about this winston-elasticsearch package you are using, but it appears to expect an Elasticsearch Javascript client configuration. Documents for the Elasticsearch Javascript client are here.
In particular, I think you might try something like this for your esTransportOpts
variable:
var esTransportOpts = {
level: 'info',
clientOpts: { node: 'http://localhost:9200' }
}
Of course, please adjust that URL to point to your actual Elasticsearch cluster.
I hope this is helpful for you!
-William
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.