Packaging Kibana Plugins

I have created a custom Kibana plugin at https://github.com/rndrev/fsm_plugin

How can I package this plugin for distribution as a zip file?

I tried running npm run build in the development environment but it errors out!

Thanks,
rndrev

Here is the log where it errors out:

info [ kibana ] Transpiling sources with typescript compiler
│ info Compiling /home/user/devel2/kibana/tsconfig.types.json project
│ debg /home/user/devel2/kibana/node_modules/typescript/bin/tsc --pretty true --project /home/user/devel2/kibana/tsconfig.types.json │ info Compiling /home/user/devel2/kibana/build/kibana/tsconfig.types.json project │ debg /home/user/devel2/kibana/node_modules/typescript/bin/tsc --pretty true --project /home/user/devel2/kibana/build/kibana/tsconfig.types.json
│ info Compiling /home/user/devel2/kibana/build/kibana/tsconfig.json project
│ debg /home/user/devel2/kibana/node_modules/typescript/bin/tsc --pretty true --project /home/user/devel2/kibana/build/kibana/tsconfig.json │ info Compiling /home/user/devel2/kibana/build/kibana/tsconfig.browser.json project │ debg /home/user/devel2/kibana/node_modules/typescript/bin/tsc --pretty true --project /home/user/devel2/kibana/build/kibana/tsconfig.browser.json
│ debg src/core/public/notifications/toasts/global_toast_list.tsx:20:30 - error TS2305: Module ''@elastic/eui'' has no exported member 'Toast'.
│ debg
│ debg 20 import { EuiGlobalToastList, Toast } from '@elastic/eui';
│ debg ~~~~~
│ debg
│ debg src/core/public/notifications/toasts/index.ts:22:10 - error TS2305: Module ''@elastic/eui'' has no exported member 'Toast'.
│ debg
│ debg 22 export { Toast } from '@elastic/eui';
│ debg ~~~~~
│ debg
│ debg src/core/public/notifications/toasts/toasts_service.tsx:23:10 - error TS2305: Module ''@elastic/eui'' has no exported member 'Toast'.
│ debg
│ debg 23 import { Toast } from '@elastic/eui';
│ debg ~~~~~

@rndrev running the build script of your plugin is the right way to do it.
Those errors you are having looks legit to me, so in order to pack the plugin as a zip archive, you will need to solve them.

Have you generated your plugin from the last available plugin template generator? Also, are you compiling against the last version?

Hey tiagocosta,

My plugin is programmed for Kibana 6.7.1, so not the latest version. Is there another way to include the plugin in a production instance...can I just copy the files over?

Thanks,
rndrev

Well I guess that just copy the plugin folder to your production instance under plugins folder would work, but you should really try to solve the legit errors and run the build on the plugin itself.

Cheers

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