Previously I generated the plugin using template-kibana-plugin against kibana 6.2, and basically it was working well.
Since a bundled plugin generator is included in >=6.3, So I tried to generate a new plugin using the bundled plugin generator against kibana 6.x, then I saw this issue. The plugin was generated in directory ../kibana-extra/example_v_2. The steps are as below,
yarn run v1.5.1
warning package.json: No license field
$ plugin-helpers start
child_process.js:624
throw err;
^
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 (/home/opc/benjamin/js/kibana_plugins/kibana/packages/kbn-plugin-helpers/tasks/start/start_action.js:19:3)
at run (/home/opc/benjamin/js/kibana_plugins/kibana/packages/kbn-plugin-helpers/lib/run.js:9:10)
at /home/opc/benjamin/js/kibana_plugins/kibana/packages/kbn-plugin-helpers/cli.js:25:7
at Command.actionWrapper (/home/opc/benjamin/js/kibana_plugins/kibana/packages/kbn-plugin-helpers/cli.js:12:8)
at Command.listener (/home/opc/benjamin/js/kibana_plugins/kibana/packages/kbn-plugin-helpers/node_modules/commander/index.js:315:8)
at emitTwo (events.js:126:13)
at Command.emit (events.js:214:7)
error An unexpected error occurred: "Command failed.
Exit code: 1
Command: sh
Arguments: -c plugin-helpers start
Directory: /home/opc/benjamin/js/kibana_plugins/kibana-extra/guard_v_2
Output:
".
info If you think this is a bug, please open a bug report with the information provided in "/home/opc/benjamin/js/kibana_plugins/kibana-extra/guard_v_2/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command
Hi,
I am facing the exact same issue. I followed the steps mentioned on (https://github.com/elastic/kibana/tree/6.x/packages/kbn-plugin-generator) and i receive the following error.

I can upload the trace file if needed, please let me know. Copying the folder to the plugins directory allows me to view the plugin in Kibana, but trying to start it from the kibana-extra directory results in this error.

Notice that all versions are same and I was able to start the test plugin by copying it in the directory.
https://github.com/elastic/kibana/issues/16784
setting KIBANA_ROOT worked for me
Shouldn't this step be mentioned here?
Most helpful comment
Shouldn't this step be mentioned here?