# 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:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![steinko](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steinko/32/55862_2.png) [@steinko](https://discuss.elastic.co/u/steinko)\
**Post date:** [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/1 "2019-10-14T14:40:21Z")

</div>

How do I fix an error ConfigurationError: Missing node(s) option . Se the discripton here [https://stackoverflow.com/q/58371284/8236354](https://stackoverflow.com/q/58371284/8236354)

---

<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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 11, 2019, 5:51pm UTC](https://discuss.elastic.co/t/how-can-i-fix-error-configurationerror-missing-node-s-option-for-winston-elasticsearch/203478/3 "2019-11-11T17:51:59Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
