elastic / template-kibana-plugin

sao.js template for kibana plugins
Apache License 2.0
64 stars 34 forks source link

Getting an error when running npm start #22

Closed JustInTime111 closed 6 years ago

JustInTime111 commented 6 years ago

When I'm running npm start I keep getting the following error. I am using the master Kibana helper function which goes with my version of Kibana that I am using, 6.2.3. I have elastic search running at the default URL and even passed it as a parameter to the npm start command but it didn't help. In addition, I had a feeling it might be due to having the x-pack plugin so I also passed the Kibana config file to the npm start command, which also didn't help. Does anyone have any experience with this error?

Error: spawnSync bin/kibana ENOENT
    at _errnoException (util.js:1022:11)
    at spawnSync (child_process.js:579:20)
    at execFileSync (child_process.js:616:13)
    at module.exports (/usr/share/kibana/plugins/test/node_modules/@elastic/plugin-helpers/tasks/start/start_action.js:19:3)
    at run (/usr/share/kibana/plugins/test/node_modules/@elastic/plugin-helpers/lib/run.js:11:10)
    at Promise.resolve.then (/usr/share/kibana/plugins/test/node_modules/@elastic/plugin-helpers/lib/commander_action.js:10:19)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
    at Function.Module.runMain (module.js:695:11)
    at startup (bootstrap_node.js:188:16)
11 silly lifecycle test@0.0.0~start: Returned: code: 1  signal: null
12 info lifecycle test@0.0.0~start: Failed to exec start script
13 verbose stack Error: test@0.0.0 start: `plugin-helpers start "--config" "/etc/kibana/kibana.yml"`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at EventEmitter.emit (events.js:214:7)
13 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at ChildProcess.emit (events.js:214:7)
13 verbose stack     at maybeClose (internal/child_process.js:925:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
w33ble commented 6 years ago

/usr/share/kibana/plugins/test

Looks like you've got the paths wrong. If you're using this tool, your plugin should live next to kibana, so /usr/share/test.

See https://github.com/elastic/template-kibana-plugin#create-a-directory-for-your-plugin-that-is-right-next-to-your-kibana-directory

JustInTime111 commented 6 years ago

I fixed that issue by recreating my whole project and my 'test' plugin is now in the same directory as Kibana. But I'm not getting this error, 14 verbose stack Error: test@0.0.0 start: 'plugin-helpers start'. I've also made sure that I'm using the same version of NodeJS that Kibana is using, 6.12.2. I used 6.12.2 because that's the revision in .node-version file.

JustInTime111 commented 6 years ago

I am running npm start in my plugin directory and it gives me that message. When I run npm start in my Kibana directory it works for a while then gives an error as well.

w33ble commented 6 years ago

Could be two different things, I'm not sure. What is cytoscape, and what error do you get when you just run Kibana without your plugin?

JustInTime111 commented 6 years ago

I resolved this issue. Chromedriver wasn't installed.