# How get es object in a service module dependency in kibana?

**URL:** <https://discuss.elastic.co/t/how-get-es-object-in-a-service-module-dependency-in-kibana/161920>\
**Category:** Kibana\
**Created:** [December 22, 2018, 2:36pm UTC](https://discuss.elastic.co/t/how-get-es-object-in-a-service-module-dependency-in-kibana/161920 "2018-12-22T14:36:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lynnic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lynnic/32/27427_2.png) [@Lynnic](https://discuss.elastic.co/u/Lynnic)\
**Post date:** [December 22, 2018, 2:36pm UTC](https://discuss.elastic.co/t/how-get-es-object-in-a-service-module-dependency-in-kibana/161920/1 "2018-12-22T14:36:46Z")

</div>

I'm doing a plugin migration from 6.1.x to 6.4.x  
All plugin works well in 6.1.x  
I can get **es** module in service dependencies priviously, but it is missing in 6.4.x version(which means it is undefined)

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/4/042975abc136afc9d957e88a339aaec7d6ec8797.png)

**$http**** $q **and** configService**(which is a custom service I defined) have corresponding values

so what should I do to make **es** show in the service module?  
Is there a way to inject it ?

---

<div class="post-metadata">

**Author:** ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)\
**Post date:** [December 26, 2018, 3:49pm UTC](https://discuss.elastic.co/t/how-get-es-object-in-a-service-module-dependency-in-kibana/161920/2 "2018-12-26T15:49:27Z")

</div>

The [es service](https://github.com/elastic/kibana/blob/6.4/src/ui/public/es.js#L52) still exists in 6.4 so it should be getting a value.

What does your plugin registration look like? Does your plugin require `elasticsearch`?

---

<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:** [January 23, 2019, 3:49pm UTC](https://discuss.elastic.co/t/how-get-es-object-in-a-service-module-dependency-in-kibana/161920/3 "2019-01-23T15:49:44Z")

</div>

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