# Kibana Source Installation gives Npm Error

**URL:** <https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065>\
**Category:** Kibana\
**Created:** [May 17, 2017, 8:21am UTC](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065 "2017-05-17T08:21:22Z")\
**Posts on this page:** 19\
**Page:** 2

<div class="post-metadata">

**Author:** ![FareehaNaaz](https://avatars.discourse-cdn.com/v4/letter/f/7ba0ec/32.png) [@FareehaNaaz](https://discuss.elastic.co/u/FareehaNaaz)\
**Post date:** [May 19, 2017, 1:13pm UTC](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065/21 "2017-05-19T13:13:42Z")

</div>

i created a user with root permissions.

---

<div class="post-metadata">

**Author:** ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)\
**Post date:** [May 19, 2017, 1:37pm UTC](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065/22 "2017-05-19T13:37:09Z")

</div>

@FareehaNaaz would you mind sharing the steps you took to create this user, and the distro of Linux that you're using?

---

<div class="post-metadata">

**Author:** ![FareehaNaaz](https://avatars.discourse-cdn.com/v4/letter/f/7ba0ec/32.png) [@FareehaNaaz](https://discuss.elastic.co/u/FareehaNaaz)\
**Post date:** [May 19, 2017, 2:54pm UTC](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065/23 "2017-05-19T14:54:08Z")

</div>

# uname -r

2.6.32-279.el6.x86\_64

and the steps i followed to create this user are:  
$ sudo useradd -ou 0 -g 0 sraha  
$ sudo passwd sraha  
$ grep sraha /etc/passwd  
sraha:x:0:0::/home/sraha:/bin/bash  
$ sudo usermod -a -G root sraha

---

<div class="post-metadata">

**Author:** ![FareehaNaaz](https://avatars.discourse-cdn.com/v4/letter/f/7ba0ec/32.png) [@FareehaNaaz](https://discuss.elastic.co/u/FareehaNaaz)\
**Post date:** [May 22, 2017, 8:25am UTC](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065/24 "2017-05-22T08:25:11Z")

</div>

Hi @Brandon_Kobel i did create another user using steps:  
useradd farya  
passwd farya  
visudo (## Allow root to run any commands anywhere  
root ALL=(ALL) ALL  
farya ALL=(ALL) ALL)

$ uname -r  
3.10.0-327.el7.x86\_64

and here is what i get  
$ git checkout  
[farya@localhost kibana]$ git status

# On branch master

nothing to commit, working directory clean  
[farya@localhost kibana]$ npm run elasticsearch

> kibana@6.0.0-alpha2 elasticsearch /home/farya/kibana  
> grunt esvm:dev:keepalive

Loading "Gruntfile.js" tasks...ERROR

> > SyntaxError: Unexpected token {  
> > Warning: Task "esvm:dev:keepalive" not found. Use --force to continue.

Aborted due to warnings.

npm ERR! Linux 3.10.0-327.el7.x86\_64  
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "elasticsearch"  
npm ERR! node v4.4.0  
npm ERR! npm v2.14.20  
npm ERR! code ELIFECYCLE  
npm ERR! kibana@6.0.0-alpha2 elasticsearch: `grunt esvm:dev:keepalive`  
npm ERR! Exit status 3  
npm ERR!  
npm ERR! Failed at the kibana@6.0.0-alpha2 elasticsearch script 'grunt esvm:dev:keepalive'.  
npm ERR! This is most likely a problem with the kibana package,  
npm ERR! not with npm itself.  
npm ERR! Tell the author that this fails on your system:  
npm ERR! grunt esvm:dev:keepalive  
npm ERR! You can get information on how to open an issue for this project with:  
npm ERR! npm bugs kibana  
npm ERR! Or if that isn't available, you can get their info via:  
npm ERR!  
npm ERR! npm owner ls kibana  
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:  
npm ERR! /home/farya/kibana/npm-debug.log

also i did notice that i haven't found any "esvm" dir here.

---

<div class="post-metadata">

**Author:** ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)\
**Post date:** [May 22, 2017, 12:14pm UTC](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065/25 "2017-05-22T12:14:30Z")

</div>

@FareehaNaaz using the `-ou 0` argument when executing `sudo useradd -ou 0 -g 0 sraha` was creating a user with userId of 0, which is going to behave exactly like the `root` user and throw the `org.elasticsearch.bootstrap.StartupException: java.lang.RuntimeException: can not run elasticsearch as root` error. However, it looks like you've gotten past this with the farya user.

Whenever you get the `SyntaxError: Unexpected token { Warning: Task "esvm:dev:keepalive" not found. Use --force to continue.` error, it's because you're using the wrong version of node. If you run `nvm use $(cat .node-version)` it'll switch your version of node to what Kibana expects. It'll likely be worthwhile to switch your default version of node to this using `nvm alias default $(cat .node-version)` or looking into [avn](https://github.com/wbyoung/avn) which will do this automatically every time you change your working directory to a folder with the .node\_version file.

---

<div class="post-metadata">

**Author:** ![FareehaNaaz](https://avatars.discourse-cdn.com/v4/letter/f/7ba0ec/32.png) [@FareehaNaaz](https://discuss.elastic.co/u/FareehaNaaz)\
**Post date:** [May 22, 2017, 12:56pm UTC](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065/26 "2017-05-22T12:56:10Z")

</div>

i have looked into the node version and then i get the same error  
$ nvm use $(cat .node-version)  
Now using node v6.10.2 (npm v3.10.10)

---

<div class="post-metadata">

**Author:** ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)\
**Post date:** [May 22, 2017, 1:38pm UTC](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065/27 "2017-05-22T13:38:37Z")

</div>

@FareehaNaaz if you run `npm run elasticsearch` after running `nvm use $(cat .node-version)` could you please paste the error you receive?

---

<div class="post-metadata">

**Author:** ![FareehaNaaz](https://avatars.discourse-cdn.com/v4/letter/f/7ba0ec/32.png) [@FareehaNaaz](https://discuss.elastic.co/u/FareehaNaaz)\
**Post date:** [May 22, 2017, 1:59pm UTC](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065/28 "2017-05-22T13:59:02Z")

</div>

$ npm run elasticsearch

> kibana@6.0.0-alpha2 elasticsearch /home/farya/kibana  
> grunt esvm:dev:keepalive

Loading "Gruntfile.js" tasks...ERROR

> > Error: Cannot find module 'core-js/modules/es6.typed.array-buffer'  
> > Warning: Task "esvm:dev:keepalive" not found. Use --force to continue.

Aborted due to warnings.

npm ERR! Linux 3.10.0-327.el7.x86\_64  
npm ERR! argv "/home/farya/.nvm/versions/node/v6.10.2/bin/node" "/home/farya/.nvm/versions/node/v6.10.2/bin/npm" "run" "elasticsearch"  
npm ERR! node v6.10.2  
npm ERR! npm v3.10.10  
npm ERR! code ELIFECYCLE  
npm ERR! kibana@6.0.0-alpha2 elasticsearch: `grunt esvm:dev:keepalive`  
npm ERR! Exit status 3  
npm ERR!  
npm ERR! Failed at the kibana@6.0.0-alpha2 elasticsearch script 'grunt esvm:dev:keepalive'.  
npm ERR! Make sure you have the latest version of node.js and npm installed.  
npm ERR! If you do, this is most likely a problem with the kibana package,  
npm ERR! not with npm itself.  
npm ERR! Tell the author that this fails on your system:  
npm ERR! grunt esvm:dev:keepalive  
npm ERR! You can get information on how to open an issue for this project with:  
npm ERR! npm bugs kibana  
npm ERR! Or if that isn't available, you can get their info via:  
npm ERR! npm owner ls kibana  
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:  
npm ERR! /home/farya/kibana/npm-debug.log

---

<div class="post-metadata">

**Author:** ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)\
**Post date:** [May 22, 2017, 2:02pm UTC](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065/29 "2017-05-22T14:02:20Z")

</div>

@FareehaNaaz it looks like you need to run `npm install` because it's complaining about not being able to find a module.

---

<div class="post-metadata">

**Author:** ![FareehaNaaz](https://avatars.discourse-cdn.com/v4/letter/f/7ba0ec/32.png) [@FareehaNaaz](https://discuss.elastic.co/u/FareehaNaaz)\
**Post date:** [May 24, 2017, 9:02am UTC](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065/30 "2017-05-24T09:02:05Z")

</div>

i did run npm install first and then npm run elasticsearch, yet i get this

> kibana@6.0.0-alpha2 elasticsearch /home/farya/kibana  
> grunt esvm:dev:keepalive

Running "esvm:dev:keepalive" (esvm) task  
starting up "dev" cluster  
Keeping elasticsearch alive, to shutdown press command/control+c  
INFO - - cluster - Downloading & installing from "master" branch.  
INFO - - cluster - Installing plugins  
INFO - - cluster - Starting 1 nodes  
INFO - ? - ? - [2017-05-24T05:54:36,489][INFO][o.e.n.Node] initializing ...  
INFO - aNWi76l - node\_environment - using [1] data paths, mounts [[/ (rootfs)]], net usable\_space [90.2gb], net total\_space [100.5gb], spins? [unknown], types [rootfs]  
INFO - aNWi76l - node\_environment - heap size [1.9gb], compressed ordinary object pointers [true]  
INFO - ? - ? - [2017-05-24T05:54:36,597][INFO][o.e.n.Node] node name [aNWi76l] derived from node ID [aNWi76loSr2ouOEFi51dcA]; set [node.name] to override  
INFO - ? - ? - [2017-05-24T05:54:36,598][INFO][o.e.n.Node] version[6.0.0-alpha1-SNAPSHOT], pid[11469], build[86aab98/2017-04-28T20:24:57.275Z], OS[Linux/3.10.0-327.el7.x86\_64/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/1.8.0\_65/25.65-b01]  
INFO - ? - ? - [2017-05-24T05:54:36,598][WARN][o.e.n.Node] version [6.0.0-alpha1-SNAPSHOT] is a pre-release version of Elasticsearch and is not suitable for production  
INFO - aNWi76l - plugins\_service - loaded module [aggs-matrix-stats]  
INFO - aNWi76l - plugins\_service - loaded module [analysis-common]  
INFO - aNWi76l - plugins\_service - loaded module [ingest-common]  
INFO - aNWi76l - plugins\_service - loaded module [lang-expression]  
INFO - aNWi76l - plugins\_service - loaded module [lang-mustache]  
INFO - aNWi76l - plugins\_service - loaded module [lang-painless]  
INFO - aNWi76l - plugins\_service - loaded module [percolator]  
INFO - aNWi76l - plugins\_service - loaded module [reindex]  
INFO - aNWi76l - plugins\_service - loaded module [repository-url]  
INFO - aNWi76l - plugins\_service - loaded module [transport-netty4]  
INFO - aNWi76l - plugins\_service - no plugins loaded  
INFO - aNWi76l - discovery\_module - using discovery type [zen]  
INFO - ? - ? - [2017-05-24T05:54:40,557][INFO][o.e.n.Node] initialized  
INFO - aNWi76l - node - starting ...  
INFO - aNWi76l - transport\_service - publish\_address {127.0.0.1:9300}, bound\_addresses {127.0.0.1:9300}  
WARN - aNWi76l - bootstrap\_checks - max file descriptors [4096] for elasticsearch process is too low, increase to at least [65536]  
WARN - aNWi76l - bootstrap\_checks - max virtual memory areas vm.max\_map\_count [65530] is too low, increase to at least [262144]  
INFO - aNWi76l - master\_service - zen-disco-elected-as-master ([0] nodes joined), reason: new\_master {aNWi76l}{aNWi76loSr2ouOEFi51dcA}{BbtkhxfhTzq9Kl3N6Pe2xg}{127.0.0.1}{127.0.0.1:9300}  
INFO - aNWi76l - cluster\_applier\_service - new\_master {aNWi76l}{aNWi76loSr2ouOEFi51dcA}{BbtkhxfhTzq9Kl3N6Pe2xg}{127.0.0.1}{127.0.0.1:9300}, reason: apply cluster state (from master [master {aNWi76l}{aNWi76loSr2ouOEFi51dcA}{BbtkhxfhTzq9Kl3N6Pe2xg}{127.0.0.1}{127.0.0.1:9300} committed version [1] source [zen-disco-elected-as-master ([0] nodes joined)]])  
INFO - aNWi76l - netty\_4\_http\_server\_transport - publish\_address {127.0.0.1:9200}, bound\_addresses {127.0.0.1:9200}  
INFO - aNWi76l - node - started  
Fatal error: Client request error: connect ECONNREFUSED 192.168.1.69:9200

npm ERR! Linux 3.10.0-327.el7.x86\_64  
npm ERR! argv "/home/farya/.nvm/versions/node/v6.10.2/bin/node" "/home/farya/.nvm/versions/node/v6.10.2/bin/npm" "run" "elasticsearch"  
npm ERR! node v6.10.2  
npm ERR! npm v3.10.10  
npm ERR! code ELIFECYCLE  
npm ERR! kibana@6.0.0-alpha2 elasticsearch: `grunt esvm:dev:keepalive`  
npm ERR! Exit status 1  
npm ERR!  
npm ERR! Failed at the kibana@6.0.0-alpha2 elasticsearch script 'grunt esvm:dev:keepalive'.  
npm ERR! Make sure you have the latest version of node.js and npm installed.  
npm ERR! If you do, this is most likely a problem with the kibana package,  
npm ERR! not with npm itself.  
npm ERR! Tell the author that this fails on your system:  
npm ERR! grunt esvm:dev:keepalive  
npm ERR! You can get information on how to open an issue for this project with:  
npm ERR! npm bugs kibana  
npm ERR! Or if that isn't available, you can get their info via:  
npm ERR! npm owner ls kibana  
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:  
npm ERR! /home/farya/kibana/npm-debug.log

---

<div class="post-metadata">

**Author:** ![FareehaNaaz](https://avatars.discourse-cdn.com/v4/letter/f/7ba0ec/32.png) [@FareehaNaaz](https://discuss.elastic.co/u/FareehaNaaz)\
**Post date:** [May 25, 2017, 4:21pm UTC](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065/31 "2017-05-25T16:21:52Z")

</div>

Hi ! do you have any updates on this?

---

<div class="post-metadata">

**Author:** ![FareehaNaaz](https://avatars.discourse-cdn.com/v4/letter/f/7ba0ec/32.png) [@FareehaNaaz](https://discuss.elastic.co/u/FareehaNaaz)\
**Post date:** [May 30, 2017, 7:01am UTC](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065/32 "2017-05-30T07:01:45Z")

</div>

@Brandon_Kobel i was able to resolve the earlier issue but ran into another one while running npm start.

$ npm start

> kibana@6.0.0-alpha2 start /home/farya/KIBANA  
> babel-node --presets es2015 app.js

module.js:471  
throw err;  
^

Error: Cannot find module '/home/farya/KIBANA/app.js'  
at Function.Module.\_resolveFilename (module.js:469:15)  
at Function.Module.\_load (module.js:417:25)  
at Function.Module.runMain (module.js:604:10)  
at Object. (/home/farya/KIBANA/node\_modules/babel-cli/lib/\_babel-node.js:154:22)  
at Module.\_compile (module.js:570:32)  
at Object.Module.\_extensions..js (module.js:579:10)  
at Module.load (module.js:487:32)  
at tryModuleLoad (module.js:446:12)  
at Function.Module.\_load (module.js:438:3)  
at Module.runMain (module.js:604:10)  
npm ERR! code ELIFECYCLE  
npm ERR! errno 1  
npm ERR! kibana@6.0.0-alpha2 start: `babel-node --presets es2015 app.js`  
npm ERR! Exit status 1  
npm ERR!  
npm ERR! Failed at the kibana@6.0.0-alpha2 start script.  
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:  
npm ERR! /home/farya/.npm/\_logs/2017-05-30T06\_53\_18\_818Z-debug.log

i referred the following link to resolve the issue [javascript - How to run Node.js app with ES6 features enabled? - Stack Overflow](https://stackoverflow.com/questions/28782656/how-to-run-node-js-app-with-es6-features-enabled/29415291#29415291) but didnot help me out, also i tried by removing "node\_modules" and running npm install and installed following dependencies but it again didnt help me out.

npm install --save-dev babel-cli  
npm install --save-dev babel-preset-es2015  
npm install --save-dev babel-preset-stage-0  
npm install babel-register  
npm install express  
npm install --save-dev babel-loader babel-core babel-preset-env webpack  
npm install babel-node --presets es2015 app.js  
npm install --save babel-polyfill  
npm install --save-dev react react-dom webpack webpack-dev-server babel-loader babel-core babel-preset-es2015 babel-preset-react

---

<div class="post-metadata">

**Author:** ![softec17](https://avatars.discourse-cdn.com/v4/letter/s/4af34b/32.png) [@softec17](https://discuss.elastic.co/u/softec17)\
**Post date:** [May 30, 2017, 8:41am UTC](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065/33 "2017-05-30T08:41:27Z")

</div>

Hello,

I too face the same problem as @FareehaNaaz....can any one help us to overcome this problem

---

<div class="post-metadata">

**Author:** ![Bdriss\_Sana](https://avatars.discourse-cdn.com/v4/letter/b/bbce88/32.png) [@Bdriss\_Sana](https://discuss.elastic.co/u/Bdriss_Sana)\
**Post date:** [May 30, 2017, 3:04pm UTC](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065/34 "2017-05-30T15:04:01Z")

</div>

Can you tell us how you solved the first issue please? I still can't figure out why..

---

<div class="post-metadata">

**Author:** ![FareehaNaaz](https://avatars.discourse-cdn.com/v4/letter/f/7ba0ec/32.png) [@FareehaNaaz](https://discuss.elastic.co/u/FareehaNaaz)\
**Post date:** [May 31, 2017, 10:43am UTC](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065/35 "2017-05-31T10:43:00Z")

</div>

I installed es node and started it manually instead of npm run elasticsearch

---

<div class="post-metadata">

**Author:** ![Bdriss\_Sana](https://avatars.discourse-cdn.com/v4/letter/b/bbce88/32.png) [@Bdriss\_Sana](https://discuss.elastic.co/u/Bdriss_Sana)\
**Post date:** [May 31, 2017, 1:51pm UTC](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065/36 "2017-05-31T13:51:07Z")

</div>

Heyy FareehaNaaz,

I tried to do that too but failed : I needed the 6alpha version of ES and couldnt build it from github..  
Which version did you install?

---

<div class="post-metadata">

**Author:** ![FareehaNaaz](https://avatars.discourse-cdn.com/v4/letter/f/7ba0ec/32.png) [@FareehaNaaz](https://discuss.elastic.co/u/FareehaNaaz)\
**Post date:** [June 1, 2017, 3:04am UTC](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065/37 "2017-06-01T03:04:42Z")

</div>

i use elasticsearch-6.0.0-alpha1

> **[Elasticsearch 6.0.0-alpha1 released](https://www.elastic.co/blog/elasticsearch-6-0-0-alpha1-released)**
>
> We are excited to announce the release of Elasticsearch 6.0.0-alpha1, based on Lucene 7-SNAPSHOT. This is the first in a series of pre-6.0.0 releases designed to let you test out your application with the features and changes coming in 6.0.0, and to...

---

<div class="post-metadata">

**Author:** ![FareehaNaaz](https://avatars.discourse-cdn.com/v4/letter/f/7ba0ec/32.png) [@FareehaNaaz](https://discuss.elastic.co/u/FareehaNaaz)\
**Post date:** [June 6, 2017, 4:05am UTC](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065/38 "2017-06-06T04:05:59Z")

</div>

hi! Please let us know if you have any updates on this issue....

---

<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:** [July 4, 2017, 4:06am UTC](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065/39 "2017-07-04T04:06:10Z")

</div>

Closed on July 4, 2017, 4:06am UTC

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

[Previous page](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065.md?page=1)
