Kibana v7.2.0 plugin yarn start failed

Hi,
I follow the instruction of
node scripts/generate_plugin test
script,and successfully create the plugin template project.
Then I move to the plugins/test folder
and run yarn start,and It failed
the message as shown below
[user1@localhost test] yarn start yarn run v1.16.0 warning package.json: No license field plugin-helpers start
Task "start" failed:

Error: spawnSync node ENOENT
    at Object.spawnSync (internal/child_process.js:990:20)
    at spawnSync (child_process.js:601:24)
    at execFileSync (child_process.js:629:13)
    at module.exports (/home/user1/kibana/packages/kbn-plugin-helpers/tasks/start/start_action.js:43:3)
    at run (/home/user1/kibana/packages/kbn-plugin-helpers/lib/run.js:30:10)
    at Command.<anonymous> (/home/user1/kibana/packages/kbn-plugin-helpers/lib/commander_action.js:27:13)
    at Command.listener (/home/user1/kibana/packages/kbn-plugin-helpers/node_modules/commander/index.js:315:8)
    at Command.emit (events.js:189:13)
    at Command.parseArgs (/home/user1/kibana/packages/kbn-plugin-helpers/node_modules/commander/index.js:654:12)
    at Command.parse (/home/user1/kibana/packages/kbn-plugin-helpers/node_modules/commander/index.js:474:21)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

my kibana version is
7.2.0
and Linux version
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description: CentOS Linux release 7.4.1708 (Core)
Release: 7.4.1708
Codename: Core

Hmm, did you run yarn kbn bootstrap prior to yarn start?

Hi,Lukas

After git clone kibana,I run yarn kbn bootstrap under the /kinana folder path.
It works well. But then I change the path to /kibana/plugins/test and run yarn start,It showed the message that I mentioned above.

Hi,Lukas
I find there is no cli folder under kibana/plugins?
but the plugin-helpers script require('../cli'),why?

const nodeMajorVersion = parseFloat(process.version.replace(/^v(\d+)\..+/, '$1'));
if (nodeMajorVersion < 6) {
  console.error('FATAL: kibana-plugin-helpers requires node 6+');
  process.exit(1);
}
require('../cli');

Hi,
Sorry for my ignorance of npm-link

By the way,I try the cmd below

[user1@localhost kbn-plugin-helpers]$ pwd
/home/user1/project/kibana/packages/kbn-plugin-helpers
[user1@localhost kbn-plugin-helpers]$ node cli.js start
Task "start" failed:

Error: spawnSync node ENOENT
    at Object.spawnSync (internal/child_process.js:990:20)
    at spawnSync (child_process.js:601:24)
    at execFileSync (child_process.js:629:13)
    at module.exports (/home/user1/project/kibana/packages/kbn-plugin-helpers/tasks/start/start_action.js:43:3)
    at run (/home/user1/project/kibana/packages/kbn-plugin-helpers/lib/run.js:30:10)
    at Command.<anonymous> (/home/user1/project/kibana/packages/kbn-plugin-helpers/lib/commander_action.js:27:13)
    at Command.listener (/home/user1/project/kibana/packages/kbn-plugin-helpers/node_modules/commander/index.js:315:8)
    at Command.emit (events.js:189:13)
    at Command.parseArgs (/home/user1/project/kibana/packages/kbn-plugin-helpers/node_modules/commander/index.js:654:12)
    at Command.parse (/home/user1/project/kibana/packages/kbn-plugin-helpers/node_modules/commander/index.js:474:21)

And I console.log plugin.kibanaRoot
kbn-plugin-helpers/tasks/start/start_action.js
the result is as below

kibanaRoot:/home/user1/kibana/kibana
Task "start" failed:

Error: spawnSync node ENOENT
    at exports._errnoException (util.js:1050:11)
    at spawnSync (child_process.js:459:20)
    at execFileSync (child_process.js:496:13)
    at module.exports (/home/user1/kibana/packages/kbn-plugin-helpers/tasks/start/start_action.js:43:3)
    at run (/home/user1/kibana/packages/kbn-plugin-helpers/lib/run.js:30:10)
    at Command.<anonymous> (/home/user1/kibana/packages/kbn-plugin-helpers/lib/commander_action.js:29:13)
    at Command.listener (/home/user1/kibana/packages/kbn-plugin-helpers/node_modules/commander/index.js:315:8)
    at emitTwo (events.js:106:13)
    at Command.emit (events.js:194:7)
    at Command.parseArgs (/home/user1/kibana/packages/kbn-plugin-helpers/node_modules/commander/index.js:654:12)

why is the error kibanaRoot path?

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