# Kibana plugin development: Error when creating plugin in Kibana 8.6

**URL:** <https://discuss.elastic.co/t/kibana-plugin-development-error-when-creating-plugin-in-kibana-8-6/329264>\
**Category:** Kibana\
**Tags:** kibana-plugin-development\
**Created:** [April 4, 2023, 1:37am UTC](https://discuss.elastic.co/t/kibana-plugin-development-error-when-creating-plugin-in-kibana-8-6/329264 "2023-04-04T01:37:18Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![dms6978](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dms6978/32/112435_2.png) [@dms6978](https://discuss.elastic.co/u/dms6978)\
**Post date:** [April 4, 2023, 1:37am UTC](https://discuss.elastic.co/t/kibana-plugin-development-error-when-creating-plugin-in-kibana-8-6/329264/1 "2023-04-04T01:37:18Z")

</div>

When I create and run plugins, the following error occurs.

```auto
Refused to execute script from 'http://localhost:5601/mvk/9007199254740991/bundles/plugin/helloKibana/1.0.0/helloKibana.plugin.js' 
because its MIME type ('application/json') is not executable, and strict MIME type checking is enabled.

```

It's the same problem as the [previous topic](https://discuss.elastic.co/t/error-when-creating-plugin-in-kibana-8-6-refused-to-execute-script-from-url-bundles-plugin-datademo-1-0-0-datademo-plugin-js-because-its-mime-type-application-json-is-not-executable-and-strict-mime-type-checking-is-enabled), but there was no solution.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/7/17835697d7c26b37b496e86aa61ca8d05f63a504.png)  
 ![스크린샷 2023-04-04 오전 10.37.04](https://us1.discourse-cdn.com/elastic/original/3X/1/6/16b831b68a376499a1dcea748c21250abf60e842.png)

---

<div class="post-metadata">

**Author:** ![Sheereen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sheereen/32/122005_2.png) [@Sheereen](https://discuss.elastic.co/u/Sheereen)\
**Post date:** [April 4, 2023, 6:41am UTC](https://discuss.elastic.co/t/kibana-plugin-development-error-when-creating-plugin-in-kibana-8-6/329264/2 "2023-04-04T06:41:04Z")

</div>

Hi EunYeong,

Hope you are doing well.

Which **version of Kibana** are you using?

Is **ms\_sql** the id of your plugin?  
And can you also check if u already have a plugin that id?

Or have tried installing or creating another plugin with same id before, but later might have deleted it? If yes, then **delete kibana cache and run again.**

Do let me know if it works.

Regards,  
Sheereen

---

<div class="post-metadata">

**Author:** ![dms6978](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dms6978/32/112435_2.png) [@dms6978](https://discuss.elastic.co/u/dms6978)\
**Post date:** [April 5, 2023, 5:02am UTC](https://discuss.elastic.co/t/kibana-plugin-development-error-when-creating-plugin-in-kibana-8-6/329264/3 "2023-04-05T05:02:28Z")

</div>

Thank you for your reply.  
I'm using Kibana 8.6.

As you told me, I solved the error about ms\_sql, but I keep getting MIME type errors.  
I'm not good at React, so I don't know where to specify the type exactly. 🥲

---

<div class="post-metadata">

**Author:** ![Sheereen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sheereen/32/122005_2.png) [@Sheereen](https://discuss.elastic.co/u/Sheereen)\
**Post date:** [April 6, 2023, 7:12am UTC](https://discuss.elastic.co/t/kibana-plugin-development-error-when-creating-plugin-in-kibana-8-6/329264/4 "2023-04-06T07:12:41Z")

</div>

Did you try deleting the cache and running Kibana again?

Go to the kibana folder, then execute the following commands sequentially.  
yarn cache clean  
yarn kbn clean  
yarn kbn bootstrap

Then go into your plugin folder and do:  
npm i

Then start kibana with ..... yarn start.... in kibana folder

---

<div class="post-metadata">

**Author:** ![Sheereen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sheereen/32/122005_2.png) [@Sheereen](https://discuss.elastic.co/u/Sheereen)\
**Post date:** [April 6, 2023, 7:31am UTC](https://discuss.elastic.co/t/kibana-plugin-development-error-when-creating-plugin-in-kibana-8-6/329264/5 "2023-04-06T07:31:10Z")

</div>

Moreover, mime type errors can come up if you have specified any incorrect file path in your plugin code.

And also, when you inspect your kibana page (right click -\> choose inspect)  
=\> go to Network tab  
=\> there in the Name column, you will find **\<plugin\_id\>.chunk.js** -\> select it  
=\> You will find the General details, request and response headers for that request  
=\> Check the **content-type in Response headers**.... it should be **application/javascript;**

---

<div class="post-metadata">

**Author:** ![Sheereen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sheereen/32/122005_2.png) [@Sheereen](https://discuss.elastic.co/u/Sheereen)\
**Post date:** [April 6, 2023, 7:35am UTC](https://discuss.elastic.co/t/kibana-plugin-development-error-when-creating-plugin-in-kibana-8-6/329264/6 "2023-04-06T07:35:07Z")

</div>

Moreover... I had encountered this error when I had shifted to 8.6after installing my custom plugin in another instance , few weeks after they released the version.

I then shifted back to the previous stable release, 8.5.3.... then there were no problems.

I'll try installing 8.6 and doing the same again.... so we can confirm whether it's an issue with the 8.6 version.

---

<div class="post-metadata">

**Author:** ![dms6978](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dms6978/32/112435_2.png) [@dms6978](https://discuss.elastic.co/u/dms6978)\
**Post date:** [April 18, 2023, 2:27am UTC](https://discuss.elastic.co/t/kibana-plugin-development-error-when-creating-plugin-in-kibana-8-6/329264/7 "2023-04-18T02:27:54Z")

</div>

Thank you so much, @Sheereen

I'll keep trying!!!! 🔥 🔥

---

<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:** [May 16, 2023, 2:28am UTC](https://discuss.elastic.co/t/kibana-plugin-development-error-when-creating-plugin-in-kibana-8-6/329264/8 "2023-05-16T02:28:02Z")

</div>

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