# Node.js library - missing namespaces

**URL:** <https://discuss.elastic.co/t/node-js-library-missing-namespaces/178806>\
**Category:** Elasticsearch\
**Created:** [April 28, 2019, 3:13pm UTC](https://discuss.elastic.co/t/node-js-library-missing-namespaces/178806 "2019-04-28T15:13:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![liorg2](https://avatars.discourse-cdn.com/v4/letter/l/ed8c4c/32.png) [@liorg2](https://discuss.elastic.co/u/liorg2)\
**Post date:** [April 28, 2019, 3:13pm UTC](https://discuss.elastic.co/t/node-js-library-missing-namespaces/178806/1 "2019-04-28T15:13:39Z")

</div>

hi,  
I'm using the official node.js lib from npm,  
but many functions, that appears on the api reference list, are not included there..  
for example submitting a new job of machine learning.  
the other option is to use a plain rest call, but I prefer to use the native option if exists.

in the image below, client.ml is not defined.  
what am I missing ?  
thanks

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/3/93b6bf5bae0d361be50d5c3057b80fc896798707.png)

---

<div class="post-metadata">

**Author:** ![liorg2](https://avatars.discourse-cdn.com/v4/letter/l/ed8c4c/32.png) [@liorg2](https://discuss.elastic.co/u/liorg2)\
**Post date:** [May 5, 2019, 9:34am UTC](https://discuss.elastic.co/t/node-js-library-missing-namespaces/178806/2 "2019-05-05T09:34:54Z")

</div>

resolved by installing `npm i @elastic/elasticsearch` instead of `npm i 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:** [June 2, 2019, 9:34am UTC](https://discuss.elastic.co/t/node-js-library-missing-namespaces/178806/3 "2019-06-02T09:34:58Z")

</div>

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