Kibana: npm run elasticsearch: Fatal error: Cannot read property 'master' of undefined

Created on 4 Dec 2016  路  9Comments  路  Source: elastic/kibana

Hi all,

I am trying to build up a kibana development environment as described here and forked, then cloned the kibana repo. I麓ve set up the development environment until it was failing at "npm run elasticsearch" step. I have already searched for a solution without any result. Therefore I appreciate any support. Thank you in advance.

Here is the trace log:

0 info it worked if it ends with ok
1 verbose cli [ '/home/caesar/.nvm/versions/node/v6.9.0/bin/node',
1 verbose cli   '/home/caesar/.nvm/versions/node/v6.9.0/bin/npm',
1 verbose cli   'run',
1 verbose cli   'elasticsearch' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'preelasticsearch', 'elasticsearch', 'postelasticsearch' ]
5 info lifecycle [email protected]~preelasticsearch: [email protected]
6 silly lifecycle [email protected]~preelasticsearch: no script for preelasticsearch, continuing
7 info lifecycle [email protected]~elasticsearch: [email protected]
8 verbose lifecycle [email protected]~elasticsearch: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]~elasticsearch: PATH: /home/caesar/.nvm/versions/node/v6.9.0/lib/node_modules/npm/bin/node-gyp-bin:/home/caesar/kibana/node_modules/.bin:/home/caesar/.nvm/versions/node/v6.9.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/home/caesar/bin:/usr/lib/jvm/java-8-oracle/bin
10 verbose lifecycle [email protected]~elasticsearch: CWD: /home/caesar/kibana
11 silly lifecycle [email protected]~elasticsearch: Args: [ '-c', 'grunt esvm:dev:keepalive' ]
12 silly lifecycle [email protected]~elasticsearch: Returned: code: 1  signal: null
13 info lifecycle [email protected]~elasticsearch: Failed to exec elasticsearch script
14 verbose stack Error: [email protected] elasticsearch: `grunt esvm:dev:keepalive`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (/home/caesar/.nvm/versions/node/v6.9.0/lib/node_modules/npm/lib/utils/lifecycle.js:255:16)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at EventEmitter.emit (events.js:191:7)
14 verbose stack     at ChildProcess.<anonymous> (/home/caesar/.nvm/versions/node/v6.9.0/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at ChildProcess.emit (events.js:191:7)
14 verbose stack     at maybeClose (internal/child_process.js:877:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid [email protected]
16 verbose cwd /home/caesar/kibana
17 error Linux 3.16.0-4-amd64
18 error argv "/home/caesar/.nvm/versions/node/v6.9.0/bin/node" "/home/caesar/.nvm/versions/node/v6.9.0/bin/npm" "run" "elasticsearch"
19 error node v6.9.0
20 error npm  v3.10.8
21 error code ELIFECYCLE
22 error [email protected] elasticsearch: `grunt esvm:dev:keepalive`
22 error Exit status 1
23 error Failed at the [email protected] elasticsearch script 'grunt esvm:dev:keepalive'.
23 error Make sure you have the latest version of node.js and npm installed.
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 ]

Here is the command prompt:

```
npm run elasticsearch

[email protected] elasticsearch /home/caesar/kibana
grunt esvm:dev:keepalive

Running "esvm:dev:keepalive" (esvm) task
starting up "dev" cluster
Keeping elasticsearch alive, to shutdown press command/control+c
Fatal error: Cannot read property 'master' of undefined

npm ERR! Linux 3.16.0-4-amd64
npm ERR! argv "/home/caesar/.nvm/versions/node/v6.9.0/bin/node" "/home/caesar/.nvm/versions/node/v6.9.0/bin/npm" "run" "elasticsearch"
npm ERR! node v6.9.0
npm ERR! npm v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! [email protected] elasticsearch: grunt esvm:dev:keepalive
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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/caesar/kibana/npm-debug.log
```

Most helpful comment

Yep, sorry folks, just redeployed the service. DNS might take some time to propagate. Sorry for the downtime

All 9 comments

Having the same issue:

Fatal error: Cannot read property 'master' of undefined
TypeError: Cannot read property 'master' of undefined
    at /home/yfful/documents/sindice/code/scampi-kibana/node_modules/libesvm/lib/installFromBranch.js:19:23
    at tryCatcher (/home/yfful/documents/sindice/code/scampi-kibana/node_modules/libesvm/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (/home/yfful/documents/sindice/code/scampi-kibana/node_modules/libesvm/node_modules/bluebird/js/main/promise.js:507:31)
    at Promise._settlePromiseAt (/home/yfful/documents/sindice/code/scampi-kibana/node_modules/libesvm/node_modules/bluebird/js/main/promise.js:581:18)
    at Async._drainQueue (/home/yfful/documents/sindice/code/scampi-kibana/node_modules/libesvm/node_modules/bluebird/js/main/async.js:128:12)
    at Async._drainQueues (/home/yfful/documents/sindice/code/scampi-kibana/node_modules/libesvm/node_modules/bluebird/js/main/async.js:133:10)
    at Immediate.Async.drainQueues (/home/yfful/documents/sindice/code/scampi-kibana/node_modules/libesvm/node_modules/bluebird/js/main/async.js:15:14)
    at runCallback (timers.js:637:20)
    at tryOnImmediate (timers.js:610:5)
    at processImmediate [as _immediateCallback] (timers.js:582:5)

@cstock89 Very strange... I tried to replicate this on master, but couldn't. So I tried to start at the beginning by checking out your fork but found something odd. It looks like your repo only contains the README?

I doubt this is the cause of your issue since it's affecting other people, but to help me retrace your steps could you make sure your repo is forked correctly? Out of curiosity, how did you fork it exactly? Did you hit the "Fork" button in the GitHub UI?

image

esvm's backend had some struggles today, but we've moved it from it's existing location to aws so this should be resolved (though it might take a couple hours for the DNS changes to propagate to you). Please reopen this issue if the problem resurfaces.

Just to be sure the problem also isn't caused by lingering esvm data, try deleting your kibana/esvm directory and then trying to run npm run elasticsearch again, as well.

I am getting exactly same issue.
could you please help me that how we can resolve this issue.

i have

Fatal error: Cannot read property 'master' of undefined

any indication of how to solve it?

Seems to be fixed? At least, I had the same issue, even after changing the branch to the 5.6.2 release version. After a couple of times running the command npm run elasticsearch, it finally starts "Downloading & installing from 5.x branch". So guess it was a remote issue?

Yep, sorry folks, just redeployed the service. DNS might take some time to propagate. Sorry for the downtime

now seems to be working

Was this page helpful?
0 / 5 - 0 ratings