# Kibana customisation - optimize error

**URL:** <https://discuss.elastic.co/t/kibana-customisation-optimize-error/273008>\
**Category:** Kibana\
**Created:** [May 14, 2021, 10:47am UTC](https://discuss.elastic.co/t/kibana-customisation-optimize-error/273008 "2021-05-14T10:47:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![preetish\_P](https://avatars.discourse-cdn.com/v4/letter/p/77aa72/32.png) [@preetish\_P](https://discuss.elastic.co/u/preetish_P)\
**Post date:** [May 14, 2021, 10:47am UTC](https://discuss.elastic.co/t/kibana-customisation-optimize-error/273008/1 "2021-05-14T10:47:19Z")

</div>

Hi folks,

I am currently working on customising the UI of Kibana v7.11.2. I am trying this locally on macOS. However I am not able to create the `optimize` folder automatically.

After making changes to the required CSS files, I deleted the optimize folder under `src/` and restarted kibana from home directory using: `bin/kibana` which resulted in below error:

```auto
 FATAL Error: Cannot find module '../../optimize'
Require stack:
- KIBANA_HOME/src/legacy/server/kbn_server.js
- KIBANA_HOME/src/core/server/legacy/legacy_service.js
- KIBANA_HOME/src/core/server/legacy/index.js
- KIBANA_HOME/src/core/server/server.js
- KIBANA_HOME/src/core/server/root/index.js
- KIBANA_HOME/src/core/server/bootstrap.js
- KIBANA_HOME/src/core/server/index.js
- KIBANA_HOME/src/cli/serve/serve.js
- KIBANA_HOME/src/cli/cli.js
- KIBANA_HOME/src/cli/dist.js

```

All those files are present in the path with required permissions. I also tried the command `bin/kibana --optimize` but it returned back control with no result.  
I am running the setup with default settings. Absolutely no changes done to `elasticsearch.yml` and `kibana.yml` other than use a different port.

What am I doing wrong ?Is there a way to force the bundling process ?

Thank you

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [May 17, 2021, 1:22pm UTC](https://discuss.elastic.co/t/kibana-customisation-optimize-error/273008/2 "2021-05-17T13:22:45Z")

</div>

Hello,

What are you using as a basis to customize? the released build? Or the source from github?

---

<div class="post-metadata">

**Author:** ![preetish\_P](https://avatars.discourse-cdn.com/v4/letter/p/77aa72/32.png) [@preetish\_P](https://discuss.elastic.co/u/preetish_P)\
**Post date:** [May 17, 2021, 2:05pm UTC](https://discuss.elastic.co/t/kibana-customisation-optimize-error/273008/3 "2021-05-17T14:05:33Z")

</div>

Hi @Marius_Dragomir

I am using the released build.

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [May 17, 2021, 2:16pm UTC](https://discuss.elastic.co/t/kibana-customisation-optimize-error/273008/4 "2021-05-17T14:16:42Z")

</div>

There should be no need to remove the src/optimize folder any more. Can you try without that?

---

<div class="post-metadata">

**Author:** ![preetish\_P](https://avatars.discourse-cdn.com/v4/letter/p/77aa72/32.png) [@preetish\_P](https://discuss.elastic.co/u/preetish_P)\
**Post date:** [May 17, 2021, 3:25pm UTC](https://discuss.elastic.co/t/kibana-customisation-optimize-error/273008/5 "2021-05-17T15:25:23Z")

</div>

Ah yes ! There is no need to delete the `optimize` folder.  
(Seems my changes were not correct hence were not reflecting)

Thank you

---

<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:** [June 14, 2021, 3:25pm UTC](https://discuss.elastic.co/t/kibana-customisation-optimize-error/273008/6 "2021-06-14T15:25:52Z")

</div>

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