Kibana Plugin helpers command not found in plugin development

Hi, Kibana community,

I ran into an issue when porting a new version of my calendar visualization plugin

for Kibana master branch. I followed the doc here:

It seems that yarn add --dev link:../../kibana/packages/kbn-plugin-helpers does not help and after I run yarn kbn bootstrap and there was an error when I ran yarn test:

yarn run v1.10.1
$ yarn test:browser && yarn test:jest && yarn test:functionalTests
$ plugin-helpers test:browser
/bin/sh: plugin-helpers: command not found
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I found yarn kbn bootstrap skips the dependency of @kbn/plugin-helpers:

...
Installing dependencies in [kibana]:

$ node ./preinstall_check
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/5] :mag: Validating package.json...
[2/5] :mag: Resolving packages...
success Already up-to-date.
Skipping workspace project: @elastic/datemath
Skipping workspace project: @elastic/eslint-config-kibana
Skipping workspace project: @elastic/eslint-plugin-kibana-custom
Skipping workspace project: @kbn/babel-code-parser
Skipping workspace project: @kbn/babel-preset
Skipping workspace project: @kbn/config-schema
Skipping workspace project: @kbn/dev-utils
Skipping workspace project: @kbn/es-query
Skipping workspace project: @kbn/es
Skipping workspace project: @kbn/eslint-import-resolver-kibana
Skipping workspace project: @kbn/eslint-plugin-license-header
Skipping workspace project: @kbn/i18n
Skipping workspace project: @kbn/interpreter
Skipping workspace project: @kbn/plugin-generator
Skipping workspace project: @kbn/plugin-helpers
Skipping workspace project: @kbn/pm
Skipping workspace project: @kbn/system-loader
Skipping workspace project: @kbn/test-subj-selector
Skipping workspace project: @kbn/test
Skipping workspace project: @kbn/ui-framework
Skipping workspace project: kbn_tp_custom_visualizations
Skipping workspace project: kbn_tp_sample_app_plugin
Skipping workspace project: kbn_tp_sample_panel_action
Skipping workspace project: kbn_tp_visualize_embedding
Skipping workspace project: x-pack
Skipping workspace project: infra
....

In this setup, I used the same versions of node and yarn with Kibana master branch.
Any help would be appreciated.

@spalger Any idea here?

with link: style dependencies yarn doesn't include the necessary .bin symlinks, but we patch that behavior when you run yarn kbn bootstrap. When you ran yarn add --dev ... yarn destroys the patch that we add, so you have to run yarn kbn bootstrap again to patch the bin scripts. Because of this and other minor gotchas I recommend editing the package.json file directly rather than using yarn add ... and then run yarn kbn bootstrap to install/remove dependencies from your plugin.

I tried to run only the yarn kbn bootstrap under my project, it didn't fetch node_modules under the project and plugin-helpers still not found. The yarn kbn bootstrap command only still skips the dependencies as shown in the above comment.

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