# Kibana plugin generator

**URL:** <https://discuss.elastic.co/t/kibana-plugin-generator/254021>\
**Category:** Kibana\
**Tags:** kibana-plugin-development\
**Created:** [November 2, 2020, 12:26pm UTC](https://discuss.elastic.co/t/kibana-plugin-generator/254021 "2020-11-02T12:26:44Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![omerf](https://avatars.discourse-cdn.com/v4/letter/o/7993a0/32.png) [@omerf](https://discuss.elastic.co/u/omerf)\
**Post date:** [November 2, 2020, 12:26pm UTC](https://discuss.elastic.co/t/kibana-plugin-generator/254021/1 "2020-11-02T12:26:44Z")

</div>

I downloaded kibana for development, and using yarn and the - node scripts/generate\_plugin my\_plugin\_name  
I made a plugin. The files are creates as index.ts and not .js. Is there a way to change to react and not typescript in the generation? also if I want to add a plugin from zip, how is this done in the dev kibana?

---

<div class="post-metadata">

**Author:** ![majagrubic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/majagrubic/32/74459_2.png) [@majagrubic](https://discuss.elastic.co/u/majagrubic)\
**Post date:** [November 2, 2020, 1:21pm UTC](https://discuss.elastic.co/t/kibana-plugin-generator/254021/2 "2020-11-02T13:21:05Z")

</div>

Hi, Kibana is moving to be fully typescript. In line with that, all newly generated files are using typescript. You can add the plugin from zip file by running  
`bin/kibana-plugin install file:///local/path/to/custom_plugin.zip`

---

<div class="post-metadata">

**Author:** ![omerf](https://avatars.discourse-cdn.com/v4/letter/o/7993a0/32.png) [@omerf](https://discuss.elastic.co/u/omerf)\
**Post date:** [November 2, 2020, 2:30pm UTC](https://discuss.elastic.co/t/kibana-plugin-generator/254021/3 "2020-11-02T14:30:49Z")

</div>

And is there any documentation and examples of plugins in typescript, I can only find in React and nearly no documentation?

---

<div class="post-metadata">

**Author:** ![majagrubic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/majagrubic/32/74459_2.png) [@majagrubic](https://discuss.elastic.co/u/majagrubic)\
**Post date:** [November 2, 2020, 2:40pm UTC](https://discuss.elastic.co/t/kibana-plugin-generator/254021/4 "2020-11-02T14:40:33Z")

</div>

You can have a look at some of our [sample plugins](https://github.com/elastic/kibana/tree/7.9/examples), I believe most of them should be written using typescript.

---

<div class="post-metadata">

**Author:** ![omerf](https://avatars.discourse-cdn.com/v4/letter/o/7993a0/32.png) [@omerf](https://discuss.elastic.co/u/omerf)\
**Post date:** [November 9, 2020, 3:37pm UTC](https://discuss.elastic.co/t/kibana-plugin-generator/254021/5 "2020-11-09T15:37:52Z")

</div>

I want to use the dropdown field like the search example plugin, to display the indexes that exist in kibana.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/b/8bb111c355f7a83001d4e7e67a9a9549c1593373.png)

When I add the Index Pattern select const (last line of the picture), the kibana plugin loads with an empty page. I would love to see examples on how to develop this.

---

<div class="post-metadata">

**Author:** ![majagrubic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/majagrubic/32/74459_2.png) [@majagrubic](https://discuss.elastic.co/u/majagrubic)\
**Post date:** [November 10, 2020, 8:54am UTC](https://discuss.elastic.co/t/kibana-plugin-generator/254021/6 "2020-11-10T08:54:41Z")

</div>

At the first glance, the code looks correct. Is `data.ui` initialized properly? Have you added `data` as a dependency to the json file of your plugin?

> <https://github.com/elastic/kibana/blob/7.9/examples/state_containers_examples/kibana.json#L7>

---

<div class="post-metadata">

**Author:** ![omerf](https://avatars.discourse-cdn.com/v4/letter/o/7993a0/32.png) [@omerf](https://discuss.elastic.co/u/omerf)\
**Post date:** [November 10, 2020, 9:01am UTC](https://discuss.elastic.co/t/kibana-plugin-generator/254021/7 "2020-11-10T09:01:52Z")

</div>

> [@majagrubic](#):
>
> ` "requiredBundles": ["kibanaUtils", "kibanaReact"]`

Data is added in the kibana.json, and used. You can see it in the const export a few lines above. Are there examples of using the select index pattern fields? or other ways

---

<div class="post-metadata">

**Author:** ![Pierre\_Gayvallet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pierre_gayvallet/32/77239_2.png) [@Pierre\_Gayvallet](https://discuss.elastic.co/u/Pierre_Gayvallet)\
**Post date:** [November 10, 2020, 10:28am UTC](https://discuss.elastic.co/t/kibana-plugin-generator/254021/8 "2020-11-10T10:28:56Z")

</div>

Would you mind opening the debugger / dev tools in your browser and sharing the error you see when trying to access your app?

---

<div class="post-metadata">

**Author:** ![omerf](https://avatars.discourse-cdn.com/v4/letter/o/7993a0/32.png) [@omerf](https://discuss.elastic.co/u/omerf)\
**Post date:** [November 10, 2020, 10:45am UTC](https://discuss.elastic.co/t/kibana-plugin-generator/254021/9 "2020-11-10T10:45:27Z")

</div>

When using the const line, the console looks fine with no errors:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/5/95f48d5c918a9d694b177c1241e3f29717fe467b.png)

but the browser opens with a blank page:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/8/288f9f98783b9d45f206121d17ae7ef5f691edc7.png)

---

<div class="post-metadata">

**Author:** ![omerf](https://avatars.discourse-cdn.com/v4/letter/o/7993a0/32.png) [@omerf](https://discuss.elastic.co/u/omerf)\
**Post date:** [November 10, 2020, 11:00am UTC](https://discuss.elastic.co/t/kibana-plugin-generator/254021/10 "2020-11-10T11:00:31Z")

</div>

The problem was that under the application.tsx file, I didn't import the data object.  
Thanks all!

---

<div class="post-metadata">

**Author:** ![omerf](https://avatars.discourse-cdn.com/v4/letter/o/7993a0/32.png) [@omerf](https://discuss.elastic.co/u/omerf)\
**Post date:** [November 11, 2020, 8:17am UTC](https://discuss.elastic.co/t/kibana-plugin-generator/254021/11 "2020-11-11T08:17:49Z")

</div>

I have the plugin working on the dev and version 7.9.3. As I said above, I am using the data plugin included in src/plugins/ data. When Installing the plugin on the version we use, 7.0.1, it is succesfully installing, but not displaying on the sidebar or through the link. I can see that there is no data src included in this version, is this the problem?

If so, what alternatives can I use?

---

<div class="post-metadata">

**Author:** ![ssasporta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ssasporta/32/13695_2.png) [@ssasporta](https://discuss.elastic.co/u/ssasporta)\
**Post date:** [November 11, 2020, 9:33am UTC](https://discuss.elastic.co/t/kibana-plugin-generator/254021/12 "2020-11-11T09:33:25Z")

</div>

Hi, What if we develop a plugin for a previous Kibana version (7.0.1)  
Do we have any limitation for doing it because of the Kibana generator?

---

<div class="post-metadata">

**Author:** ![majagrubic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/majagrubic/32/74459_2.png) [@majagrubic](https://discuss.elastic.co/u/majagrubic)\
**Post date:** [November 12, 2020, 7:44am UTC](https://discuss.elastic.co/t/kibana-plugin-generator/254021/13 "2020-11-12T07:44:47Z")

</div>

The generator is here to help with things. You can still develop a plugin, but beware the architecture has changed a lot in between 7.0.1 -\> 7.10.0 versions.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 10, 2020, 7:44am UTC](https://discuss.elastic.co/t/kibana-plugin-generator/254021/14 "2020-12-10T07:44:49Z")

</div>

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