Error: spawnSync bin\kibana.bat ENOENT

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,

  1. git clone https://github.com/elastic/kibana.git kibana

  2. cd kibana

  3. git checkout 6.x

  4. nvm install "$(cat .node-version)"

  5. yarn kbn bootstrap

  6. yarn elasticsearch
    Note: Everything is fine so far.

  7. node scripts/generate_plugin example_v2
    Then the plugin is created in directory "../kibana-extra/example_v_2". So the first question/issue is why I set the plugin name as "example_v2", but the plugin-generate created "example_v_2"?

  8. cd ../kibana-extra/example_v_2

  9. yarn kbn bootstrap;

  10. yarn start
    Then I saw the following error:

    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

I would suggest opening this as an issue in Kibana github, as this appears to be a bug in the plugin generator. The steps you outline above should work I think.

@Bill_McConaghy, thanks for the feedback. I just raised a new issue as below,

1 Like

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