# Create a new plugin for Kibana

**URL:** https://discuss.elastic.co/t/create-a-new-plugin-for-kibana/99197
**Category:** Kibana
**Created:** [September 2, 2017, 5:31pm UTC](https://discuss.elastic.co/t/create-a-new-plugin-for-kibana/99197 "2017-09-02T17:31:08Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![njkl](https://avatars.discourse-cdn.com/v4/letter/n/97f17d/32.png) [@njkl](https://discuss.elastic.co/u/njkl)
#### Post date: [September 2, 2017, 5:31pm UTC](https://discuss.elastic.co/t/create-a-new-plugin-for-kibana/99197/1 "2017-09-02T17:31:08Z")

</div>

Hi,

I am trying to create avery basic plugin for kibana, I check the offcial documentation ... but I think its outdated :

[https://www.elastic.co/guide/en/kibana/current/development-plugin-resources.html](https://www.elastic.co/guide/en/kibana/current/development-plugin-resources.html)

it says that we can use the plugin generator based upon yeo template ... didn't work at all.

so I move to the second option, I tried to use the instructions available here :

> **[GitHub - elastic/template-kibana-plugin: sao.js template for kibana plugins](https://github.com/elastic/template-kibana-plugin/)**
>
> sao.js template for kibana plugins. Contribute to elastic/template-kibana-plugin development by creating an account on GitHub.

And so far I am stuck with this error when I bootup using

> npm start

kibana-plugin-apr@0.0.0 start /home/user/apps/kibanaPluginXYZ  
plugin-helpers start

watching for changes (462 files)  
log [17:15:37.284] [info][listening] basePath Proxy running at [http://localhost:5601/xun](http://localhost:5601/xun)  
optmzr log [17:15:45.776] [info][status][ui settings] Status changed from uninitialized to disabled - uiSettings.enabled config is set to `false`  
server log [17:15:55.525] [info][optimize] Waiting for optimizer completion  
optmzr log [17:15:56.344] [info][optimize] Lazy optimization of bundles for kibana-plugin-xyz, kibana, stateSessionStorageRedirect, timelion, sense-tests and status\_page ready  
optmzr log [17:15:56.356] [info][optimize] Lazy optimization started  
optmzr log [17:15:56.756] [info] Plugin initialization disabled.  
server log [17:15:56.793] [info][status][plugin:kibana@7.0.0-alpha1] Status changed from uninitialized to green - Ready  
server log [17:15:56.976] [info][status][plugin:elasticsearch@7.0.0-alpha1] Status changed from uninitialized to yellow - Waiting for Elasticsearch  
server log [17:15:57.035] [info][status][plugin:kibana-plugin-apr@0.0.0] Status changed from uninitialized to green - Ready  
server log [17:15:57.056] [info][status][plugin:console@7.0.0-alpha1] Status changed from uninitialized to green - Ready  
server log [17:15:57.083] [info][status][plugin:metrics@7.0.0-alpha1] Status changed from uninitialized to green - Ready  
server log [17:15:58.473] [info][status][plugin:timelion@7.0.0-alpha1] Status changed from uninitialized to green - Ready  
server log [17:15:58.489] [info][listening] Server running at [http://localhost:5603](http://localhost:5603)  
server log [17:15:58.491] [info][status][ui settings] Status changed from uninitialized to yellow - Elasticsearch plugin is yellow  
server log [17:16:05.278] [info][status][plugin:elasticsearch@7.0.0-alpha1] Status changed from yellow to yellow - No existing Kibana index found  
server log [17:16:19.549] [info][status][plugin:elasticsearch@7.0.0-alpha1] Status changed from yellow to green - Kibana index ready  
server log [17:16:19.552] [info][status][ui settings] Status changed from yellow to green - Ready  
optmzr log [17:17:19.907] [fatal][optimize] Lazy optimization failed in 83.52 secondsError: Optimizations failure.

```
ERROR in ./optimize/bundles/kibana.entry.js
Module not found: Error: Cannot resolve module 'plugins/kibanaPluginXYZ/hack' in /home/user/apps/kibana/optimize/bundles
 @ ./optimize/bundles/kibana.entry.js 59:0-39

ERROR in ./optimize/bundles/sense-tests.entry.js
Module not found: Error: Cannot resolve module 'plugins/kibanaPluginXYZ/hack' in /home/user/apps/kibana/optimize/bundles
 @ ./optimize/bundles/sense-tests.entry.js 34:0-39

ERROR in ./optimize/bundles/stateSessionStorageRedirect.entry.js
Module not found: Error: Cannot resolve module 'plugins/kibanaPluginXYZ/hack' in /home/user/apps/kibana/optimize/bundles
 @ ./optimize/bundles/stateSessionStorageRedirect.entry.js 34:0-39

```

---

<div class="post-metadata">

### Author: ![njkl](https://avatars.discourse-cdn.com/v4/letter/n/97f17d/32.png) [@njkl](https://discuss.elastic.co/u/njkl)
#### Post date: [September 2, 2017, 6:00pm UTC](https://discuss.elastic.co/t/create-a-new-plugin-for-kibana/99197/2 "2017-09-02T18:00:41Z")

</div>

I think I found the issue with the optimizer error below, related to the naming of the folder of the plugin : the folder name of the plugin should not contains any upper case letters ... (a bug ?)

now I am facing another issue, when trying to acces the kibana portal I get :

> {"statusCode":404,"error":"Not Found","message":"Not Found"}

kibanaplgxyz@0.0.0 start /home/user/apps/kibanaplgxyz  
plugin-helpers start

watching for changes (462 files)  
log [17:52:10.498] [info][listening] basePath Proxy running at [http://localhost:5601/jxn](http://localhost:5601/jxn)  
optmzr log [17:52:17.909] [info][status][ui settings] Status changed from uninitialized to disabled - uiSettings.enabled config is set to `false`  
server log [17:52:25.691] [info][optimize] Waiting for optimizer completion  
optmzr log [17:52:26.323] [info][optimize] Lazy optimization of bundles for kibanaplgxyz, kibana, stateSessionStorageRedirect, timelion, sense-tests and status\_page ready  
optmzr log [17:52:26.337] [info][optimize] Lazy optimization started  
optmzr log [17:52:26.367] [info] Plugin initialization disabled.  
server log [17:52:26.401] [info][status][plugin:kibana@7.0.0-alpha1] Status changed from uninitialized to green - Ready  
server log [17:52:26.547] [info][status][plugin:elasticsearch@7.0.0-alpha1] Status changed from uninitialized to yellow - Waiting for Elasticsearch  
server log [17:52:26.582] [info][status][plugin:kibanaplgapr@0.0.0] Status changed from uninitialized to green - Ready  
server log [17:52:26.607] [info][status][plugin:console@7.0.0-alpha1] Status changed from uninitialized to green - Ready  
server log [17:52:26.681] [info][status][plugin:metrics@7.0.0-alpha1] Status changed from uninitialized to green - Ready  
server log [17:52:26.685] [info][status][plugin:elasticsearch@7.0.0-alpha1] Status changed from yellow to green - Kibana index ready  
server log [17:52:28.093] [info][status][plugin:timelion@7.0.0-alpha1] Status changed from uninitialized to green - Ready  
server log [17:52:28.108] [info][listening] Server running at [http://localhost:5603](http://localhost:5603)  
server log [17:52:28.111] [info][status][ui settings] Status changed from uninitialized to green - Ready  
optmzr log [17:53:24.567] [info][optimize] Lazy optimization success in 57.91 seconds

---

<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: [September 30, 2017, 6:01pm UTC](https://discuss.elastic.co/t/create-a-new-plugin-for-kibana/99197/3 "2017-09-30T18:01:08Z")

</div>

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