Hi there!
I'm having some problems developing a kibana plugin for this specific Kibana version.
If I make EXACTLY the same steps which I'm about to describe to develop the plugin for version 7.0 or 7.1 or even 7.3, it works flawlessly. With version 7.2 I have the following error.
My steps are:
git clone https://github.com/elastic/kibana
cd kibana
git checkout 7.2
Here I can see the .node-version
is the same I am using (10.15.2). Perfect.
yarn kbn bootstrap
Here it gives me some warnings like:
warning Resolution field "core-js@2.5.3" is incompatible with requested version "core-js@^2.6.5"
warning Resolution field "@types/node@10.12.27" is incompatible with requested version "@types/node@8.5.8"
warning Resolution field "@types/node@10.12.27" is incompatible with requested version "@types/node@8.5.8"
warning Resolution field "@types/node@10.12.27" is incompatible with requested version "@types/node@8.5.8"
warning Resolution field "@types/node@10.12.27" is incompatible with requested version "@types/node@8.5.8"
[3/5] Fetching packages...
info fsevents@1.2.7: The platform "linux" is incompatible with this module.
info "fsevents@1.2.7" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
warning " > @elastic/charts@4.2.6" has incorrect peer dependency "@elastic/eui@10.4.1".
warning "workspace-aggregator-bc398412-e147-4630-89fa-8201a4e98573 > x-pack > @mapbox/mapbox-gl-draw@1.1.1" has inco
rrect peer dependency "mapbox-gl@>=0.27.0 <=0.51.0".
warning "workspace-aggregator-bc398412-e147-4630-89fa-8201a4e98573 > x-pack > react-shortcuts@2.0.0" has incorrect p
eer dependency "react@^0.14.8 || ^15".
warning "workspace-aggregator-bc398412-e147-4630-89fa-8201a4e98573 > x-pack > react-shortcuts@2.0.0" has incorrect p
eer dependency "react-dom@^0.14.8 || ^15".
warning "workspace-aggregator-bc398412-e147-4630-89fa-8201a4e98573 > x-pack > graphql-code-generator > @graphql-modu
les/epoxy@0.1.9" has unmet peer dependency "@graphql-modules/logger@*".
But it keeps bootstrapping and finally succeeds.
Then I go
`node scripts/generate_plugin.js my_sample_plugin` answering:
`? Provide a short description This is a sample plugin`
`? What Kibana version are you targeting? 7.2.2`
`? Should an app component be generated? Yes`
`? Should translation files be generated? No`
`? Should a hack component be generated? No`
`? Should a server API be generated? Yes`
`? Should SCSS be used? Yes`
It keeps loading (returning the same above-mentioned warnings) and it finally says:
Bootstrapping completed!
Done in 168.27s.
success 🎉
Your plugin has been created in plugins/my_sample_plugin. Move into that directory to run it:
cd "plugins/my_sample_plugin"
yarn start
Which is exactly what it says with version 7.3.
Problem is that now if I go to plugins/my_sample_plugin
and run yarn start
it immediately returns the error:
yarn run v1.19.1
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/fabio/Scrivania/kibana_7.2_test_plugin/kibana/packages/kbn-plugin-helpers/tasks/start/start_action.js:43:3)
at run (/home/fabio/Scrivania/kibana_7.2_test_plugin/kibana/packages/kbn-plugin-helpers/lib/run.js:30:10)
at Command.<anonymous> (/home/fabio/Scrivania/kibana_7.2_test_plugin/kibana/packages/kbn-plugin-helpers/lib/commander_action.js:27:13)
at Command.listener (/home/fabio/Scrivania/kibana_7.2_test_plugin/kibana/packages/kbn-plugin-helpers/node_modules/commander/index.js:315:8)
at Command.emit (events.js:189:13)
at Command.parseArgs (/home/fabio/Scrivania/kibana_7.2_test_plugin/kibana/packages/kbn-plugin-helpers/node_modules/commander/index.js:654:12)
at Command.parse (/home/fabio/Scrivania/kibana_7.2_test_plugin/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.
This thing is really driving me nuts since I really need to develop the plugin for the 7.2 version and apparently that is the only version returning this error.
At first I thought it was linked to the fact the from version 7.1 to 7.2 they changed the folder where the plugin is created (from kibana-extra/
sibling of kibana/
to the plugins/
which is a child of kibana/
) but then I tried with version 7.3 which creates the plugin inside the plugins/
folder as well and it worked, so I really do not know what to do about it.
Thank you for your support!