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

<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 17, 2017, 8:21am UTC](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065/1 "2017-05-17T08:21:22Z")

</div>

Hi!

i was working on kibana source installation and i went through the following steps:  
Install git from yum  
I installed Node.Js from [https://nodejs.org/download/release/latest/](https://nodejs.org/download/release/latest/)  
3.git clone [https://github.com/elastic/kibana.git](https://github.com/elastic/kibana.git) kibana  
Installed NVM from curl -o- [https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh](https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh) | bash  
nvm install "$(cat .node-version)"  
npm install  
npm run elasticsearch  
and then i got npm errors

npm run elasticsearch  
npm ERR! Linux 3.10.0-327.el7.x86\_64  
npm ERR! argv "/root/.nvm/versions/node/v7.10.0/bin/node" "/root/.nvm/versions/node/v7.10.0/bin/npm" "run" "elasticsearch"  
npm ERR! node v7.10.0  
npm ERR! npm v4.2.0  
npm ERR! path /root/package.json  
npm ERR! code ENOENT  
npm ERR! errno -2  
npm ERR! syscall open

npm ERR! enoent ENOENT: no such file or directory, open '/root/package.json'  
npm ERR! enoent ENOENT: no such file or directory, open '/root/package.json'  
npm ERR! enoent This is most likely not a problem with npm itself  
npm ERR! enoent and is related to npm not being able to find a file.  
npm ERR! enoent

npm ERR! Please include the following file with any support request:  
npm ERR! /root/.npm/\_logs/2017-05-08T15\_10\_31\_611Z-debug.log

here is log file details:  
tail -f /root/kibana/KIBANA/npm-debug.log  
23 error If you do, this is most likely a problem with the kibana package,  
23 error not with npm itself.  
23 error Tell the author that this fails on your system:  
23 error grunt esvm:dev:keepalive  
23 error You can get information on how to open an issue for this project with:  
23 error npm bugs kibana  
23 error Or if that isn't available, you can get their info via:  
23 error npm owner ls kibana  
23 error There is likely additional logging output above.  
24 verbose exit [1, true]

i have come up with 3 suggestion after searching nearly 20 different links, 1) deleting esvm dir 2) degarding node version and 3) running "npm install grunt -keep alive --save-dev, but neither of these helped me!

---

<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 17, 2017, 12:31pm UTC](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065/2 "2017-05-17T12:31:10Z")

</div>

@FareehaNaaz do you have java installed and in your PATH as well? If you run `java -version` what do you see?

---

<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 17, 2017, 12:45pm UTC](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065/3 "2017-05-17T12:45:21Z")

</div>

$ java -version  
java version "1.8.0\_102"  
Java(TM) SE Runtime Environment (build 1.8.0\_102-b14)  
Java HotSpot(TM) Server VM (build 25.102-b14, mixed mode)

---

<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 17, 2017, 3:08pm UTC](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065/4 "2017-05-17T15:08:59Z")

</div>

@FareehaNaaz you need to have your current working directory set to kibana (`cd kibana`) before running:

```auto
nvm install "$(cat .node-version)"
npm install
npm run elasticsearch

```

---

<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 17, 2017, 3:32pm UTC](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065/5 "2017-05-17T15:32:42Z")

</div>

yeah i did the same

---

<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 17, 2017, 3:35pm UTC](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065/6 "2017-05-17T15:35:40Z")

</div>

@FareehaNaaz the following error alludes to you having your current working directory at "/root"

```auto
npm ERR! enoent ENOENT: no such file or directory, open '/root/package.json'

```

did you git clone the source into "/root" I'm thinking it put it in "/root/kibana"

---

<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 17, 2017, 3:40pm UTC](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065/7 "2017-05-17T15:40:15Z")

</div>

# pwd

/home/elk/KIBANA  
[root@pdc-prd-dbware36 KIBANA]# npm run elasticsearch

> kibana@6.0.0-alpha1 elasticsearch /home/elk/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 2.6.32-279.el6.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-alpha1 elasticsearch: `grunt esvm:dev:keepalive`  
npm ERR! Exit status 3  
npm ERR!  
npm ERR! Failed at the kibana@6.0.0-alpha1 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/elk/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 17, 2017, 3:47pm UTC](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065/8 "2017-05-17T15:47:41Z")

</div>

@FareehaNaaz do you have any pending changes? If you run `git status` what do you get?

---

<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 17, 2017, 3:52pm UTC](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065/9 "2017-05-17T15:52:44Z")

</div>

i get this:

# git status

On branch master  
Changed but not updated:  
(use "git add ..." to update what will be committed)  
(use "git checkout -- ..." to discard changes in working directory)

```
modified: package.json

```

Untracked files:  
(use "git add ..." to include in what will be committed)

```
npm

```

no changes added to commit (use "git add" and/or "git commit -a")

---

<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 17, 2017, 3:56pm UTC](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065/10 "2017-05-17T15:56:19Z")

</div>

Did you intend to make changes to the package.json? It'd be helpful for you to undo your changes and try again. If you run `git checkout .` it should reset the changes that you made.

---

<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 17, 2017, 4:01pm UTC](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065/11 "2017-05-17T16:01:51Z")

</div>

i havnt made any changes, but still i gave it a try and here is the o/p

# git checkout

M package.json  
[root@pdc-prd-dbware36 KIBANA]# npm run elasticsearch

> kibana@6.0.0-alpha1 elasticsearch /home/elk/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 2.6.32-279.el6.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-alpha1 elasticsearch: `grunt esvm:dev:keepalive`  
npm ERR! Exit status 3  
npm ERR!  
npm ERR! Failed at the kibana@6.0.0-alpha1 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/elk/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 17, 2017, 5:07pm UTC](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065/12 "2017-05-17T17:07:44Z")

</div>

It looks like your node version switched back to v4.4.0, `nvm use`/`nvm install` isn't persistent across multiple terminals, you'll want to run `nvm use "$(cat .node-version)"` every-time that you open up a new terminal or investigate using (avn)[[https://www.npmjs.com/package/avn](https://www.npmjs.com/package/avn)] to do so automatically.

Additionally, please be certain that you ran "git checkout ." and it doesn't show the package.json as modified when you run "git status", i'm afraid there are still pending changes there based on:

```auto
M	package.json

```

that M to the left generally means "Modified"

---

<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 18, 2017, 9:02am UTC](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065/13 "2017-05-18T09:02:43Z")

</div>

i did follow these steps and then here is what i get:

# npm run elasticsearch

> kibana@6.0.0-alpha1 elasticsearch /root/kibana/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-18T14:28:32,247][WARN][o.e.b.ElasticsearchUncaughtExceptionHandler] uncaught exception in thread [main]  
INFO - ? - ? - org.elasticsearch.bootstrap.StartupException: java.lang.RuntimeException: can not run elasticsearch as root  
INFO - ? - ? - at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:127) ~[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT]  
INFO - ? - ? - at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:114) ~[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT]  
INFO - ? - ? - at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:67) ~[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT]  
INFO - ? - ? - at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122) ~[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT]  
INFO - ? - ? - at org.elasticsearch.cli.Command.main(Command.java:88) ~[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT]  
INFO - ? - ? - at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91) ~[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT]  
INFO - ? - ? - at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84) ~[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT]  
INFO - ? - ? - Caused by: java.lang.RuntimeException: can not run elasticsearch as root  
INFO - ? - ? - at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:104) ~[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT]  
INFO - ? - ? - at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:180) ~[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT]  
INFO - ? - ? - at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:339) ~[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT]  
INFO - ? - ? - at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:123) ~[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT]  
INFO - ? - ? - ... 6 more  
Fatal error: Server exitted with the non-zero exit code 1

npm ERR! Linux 2.6.32-279.el6.x86\_64  
npm ERR! argv "/root/.nvm/versions/node/v6.10.2/bin/node" "/root/.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-alpha1 elasticsearch: `grunt esvm:dev:keepalive`  
npm ERR! Exit status 1  
npm ERR!  
npm ERR! Failed at the kibana@6.0.0-alpha1 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! /root/kibana/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 18, 2017, 10:04am UTC](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065/14 "2017-05-18T10:04:41Z")

</div>

@FareehaNaaz

INFO - ? - ? - org.elasticsearch.bootstrap.StartupException: java.lang.RuntimeException: **can not run elasticsearch as root**

---

<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 18, 2017, 1:28pm UTC](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065/15 "2017-05-18T13:28:46Z")

</div>

hi! i have tried the same steps in another box through root user, but then i get this:

# npm run elasticsearch

> kibana@6.0.0-alpha1 elasticsearch /root/kibana/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-18T17:45:31,147][WARN][o.e.b.ElasticsearchUncaughtExceptionHandler] uncaught exception in thread [main]  
INFO - ? - ? - org.elasticsearch.bootstrap.StartupException: java.lang.RuntimeException: can not run elasticsearch as root  
INFO - ? - ? - at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:127) ~[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT]  
INFO - ? - ? - at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:114) ~[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT]  
INFO - ? - ? - at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:67) ~[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT]  
INFO - ? - ? - at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:122) ~[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT]  
INFO - ? - ? - at org.elasticsearch.cli.Command.main(Command.java:88) ~[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT]  
INFO - ? - ? - at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:91) ~[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT]  
INFO - ? - ? - at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:84) ~[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT]  
INFO - ? - ? - Caused by: java.lang.RuntimeException: can not run elasticsearch as root  
INFO - ? - ? - at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:104) ~[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT]  
INFO - ? - ? - at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:180) ~[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT]  
INFO - ? - ? - at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:339) ~[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT]  
INFO - ? - ? - at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:123) ~[elasticsearch-6.0.0-alpha1-SNAPSHOT.jar:6.0.0-alpha1-SNAPSHOT]  
INFO - ? - ? - ... 6 more  
Fatal error: Server exitted with the non-zero exit code 1

npm ERR! Linux 2.6.32-279.el6.x86\_64  
npm ERR! argv "/root/.nvm/versions/node/v6.10.2/bin/node" "/root/.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-alpha1 elasticsearch: `grunt esvm:dev:keepalive`  
npm ERR! Exit status 1  
npm ERR!  
npm ERR! Failed at the kibana@6.0.0-alpha1 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! /root/kibana/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 18, 2017, 2:01pm UTC](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065/16 "2017-05-18T14:01:58Z")

</div>

I'm seeing that same error, saying you can't run Elasticsearch as root. Have you tried creating another user, logging in as that user and then trying to run `npm run elasticsearch`?

---

<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 18, 2017, 3:56pm UTC](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065/17 "2017-05-18T15:56:43Z")

</div>

yes created a user with root permissions and then "npm run elasticsearch", still i get the same errors.

---

<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 18, 2017, 5:27pm UTC](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065/18 "2017-05-18T17:27:51Z")

</div>

@FareehaNaaz

Elasticsearch is calling the native Linux syscall [geteuid](https://linux.die.net/man/2/geteuid) to determine if the user is root. Are you running the command using `sudo`? That will trigger that check as well.

---

<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, 8:08am UTC](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065/19 "2017-05-19T08:08:36Z")

</div>

i did try by logging as my new user/ switching to my new user before running npm and also by giving sudo but all give the same error, here are my userid, group details:

# id sraha

uid=0(root) gid=0(root) groups=0(root),10(wheel)

---

<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, 12:58pm UTC](https://discuss.elastic.co/t/kibana-source-installation-gives-npm-error/86065/20 "2017-05-19T12:58:29Z")

</div>

@FareehaNaaz I'm not following, the uid and gid of that user appear to be `root`, so Elasticsearch is going to think that you're root.

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