# Writing Custom Plugins

**URL:** <https://discuss.elastic.co/t/writing-custom-plugins/241938>\
**Category:** Kibana\
**Created:** [July 20, 2020, 10:13pm UTC](https://discuss.elastic.co/t/writing-custom-plugins/241938 "2020-07-20T22:13:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tinhn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tinhn/32/73530_2.png) [@tinhn](https://discuss.elastic.co/u/tinhn)\
**Post date:** [July 20, 2020, 10:13pm UTC](https://discuss.elastic.co/t/writing-custom-plugins/241938/1 "2020-07-20T22:13:32Z")

</div>

Hello,

I'm currently developing a custom plugin for Kibana 7.8.0. I've followed the [steps](https://www.elastic.co/guide/en/kibana/current/development-plugin-resources.html) to generate a sample plugin. It successfully shows up on my kibana instance built from source.

When I try to add this plugin to my kibana instance built from RPM and click on the plugin, I see a blank page with no UI elements and the console outputs the following error message ` __REPLACE_WITH_PUBLIC_PATH__ 0.plugin.js:1 Uncaught SyntaxError: Unexpected token '<'`.

I made no changes to this file when loading the plugin (copying the plugin directory into `kibana/plugins`) and the versions of Kibana are the same. I'm was able to reproduce this exact error on two kibana instances installed using RPM. Does anybody know what could be causing this syntax error when the code was generated using a boilerplate script? Are there any steps I am missing to load my custom plugin?

Any help would be greatly appreciated.

 ![Screen Shot 2020-07-20 at 3.11.59 PM](https://us1.discourse-cdn.com/elastic/original/3X/6/8/68124d5e88e9f786666160e72aada4ae002e8159.png)

---

<div class="post-metadata">

**Author:** ![tsullivan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsullivan/32/31077_2.png) [@tsullivan](https://discuss.elastic.co/u/tsullivan)\
**Post date:** [August 6, 2020, 5:28pm UTC](https://discuss.elastic.co/t/writing-custom-plugins/241938/2 "2020-08-06T17:28:14Z")

</div>

When adding the plugin to the Kibana instance built from RPM, you should be using the plugin installer to install a build of your plugin. Based on your information it looks like that might not have been clear.

Hope that helps!

Edit:  
Use `yarn build` to build your custom plugin.

Here is a link to plugin installer documentation: [https://www.elastic.co/guide/en/kibana/master/install-plugin.html](https://www.elastic.co/guide/en/kibana/master/install-plugin.html)

---

<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 3, 2020, 5:28pm UTC](https://discuss.elastic.co/t/writing-custom-plugins/241938/3 "2020-09-03T17:28:31Z")

</div>

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