# How can I fix error: ConfigurationError: Missing node(s) option for winston-elasticsearch?

**URL:** <https://discuss.elastic.co/t/how-can-i-fix-error-configurationerror-missing-node-s-option-for-winston-elasticsearch/203478>\
**Category:** Elasticsearch\
**Created:** [October 14, 2019, 2:40pm UTC](https://discuss.elastic.co/t/how-can-i-fix-error-configurationerror-missing-node-s-option-for-winston-elasticsearch/203478 "2019-10-14T14:40:21Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![William\_Brafford](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/william_brafford/32/51559_2.png) [@William\_Brafford](https://discuss.elastic.co/u/William_Brafford)\
**Post date:** [October 14, 2019, 5:51pm UTC](https://discuss.elastic.co/t/how-can-i-fix-error-configurationerror-missing-node-s-option-for-winston-elasticsearch/203478/2 "2019-10-14T17:51:59Z")

</div>

Hi, Stein.

Looking at the stack trace you posted in StackOverflow, I see that the error happens in the creation of the Elasticsearch client:

```auto
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:

```auto
var esTransportOpts = {
  level: 'info' 
}

```

And:

```auto
       winston.createLogger({
           transports: [
               new Elasticsearch(esTransportOpts)
          ]
       })

```

I don't really know anything about this [winston-elasticsearch](https://www.npmjs.com/package/winston-elasticsearch) package you are using, but it appears to expect an Elasticsearch Javascript client configuration. Documents for the Elasticsearch Javascript client are [here](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/7.x/client-usage.html).

In particular, I think you might try something like this for your `esTransportOpts` variable:

```auto
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

---

_[View the full topic](https://discuss.elastic.co/t/how-can-i-fix-error-configurationerror-missing-node-s-option-for-winston-elasticsearch/203478)._
