kyh119
February 25, 2022, 7:54am
1
Hi,
I created my plugin, and it requires a module that I've installed using 'yarn add node-ssh'.
I did:
' yarn add @types /ssh2 ' in kibana directory.
' yarn add node-ssh' also.
in 'server/routes.ts', wrote import { NodeSSH } from 'node-ssh';
cd to kibana directory, did yarn build.
installed kibana with an archive yarn had builded.
But in distributed Kibana, there's no 'node-ssh' in node_modules.
So my plugin doesn't work. Could you help me with it?
Dzmitry
February 25, 2022, 3:17pm
2
Hi @kyh119 ,
It should be possible, please check the similar question Adding dependency to custom plugin (New Platform)
Regards, Dzmitry
kyh119
February 25, 2022, 11:56pm
3
Hi @Dzmitry , thanks for your answer.
I read the topic you posted, but I have a question.
I couldn't figured out clearly what "They should be included in the 3rd party plugin's downloaded archive" means.
Could you kindly guide for me how to include npm modules in the 3rd party plugin's downloaded archive?
Do you mean the archive that created when I use 'yarn build' at kibana directory?
Thank you.
Dzmitry
February 26, 2022, 2:20pm
4
@kyh119 ,
I think you should build your custom plugin and then manually modify archive to include dependencies. Then you should install your plugin per instructions .
Give it a try and let me know.
Regards, Dzmitry
A tiny nit: I don't think you need to modify a built artifact. Other steps look correct.
kyh119
March 2, 2022, 12:38am
6
Hi, @Mikhail_Shustov
Could you explain to me what "other steps" are?
Is there any other good way to add dependencies?
I was gonna try to modify a built archive, though.
Thank you all.
system
(system)
Closed
March 30, 2022, 12:38am
7
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.