# \[SOLVED\] X-Pack 6.2 install Fatal Error: ace.require is not a function

**URL:** <https://discuss.elastic.co/t/solved-x-pack-6-2-install-fatal-error-ace-require-is-not-a-function/127890>\
**Category:** Elasticsearch\
**Created:** [April 13, 2018, 2:50am UTC](https://discuss.elastic.co/t/solved-x-pack-6-2-install-fatal-error-ace-require-is-not-a-function/127890 "2018-04-13T02:50:20Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlphaJosh](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@AlphaJosh](https://discuss.elastic.co/u/AlphaJosh)\
**Post date:** [April 13, 2018, 2:50am UTC](https://discuss.elastic.co/t/solved-x-pack-6-2-install-fatal-error-ace-require-is-not-a-function/127890/1 "2018-04-13T02:50:20Z")

</div>

Uncaught TypeError: ace.require is not a function ([http://localhost:5601/bundles/kibana.bundle.js?v=16602:1](http://localhost:5601/bundles/kibana.bundle.js?v=16602:1))

I am struggling to get X-Pack 6.2.3 running a single node on Windows 10 and Windows 2012.  
I have installed three times already. ELK works before X-Pack.

Once the X-Pack has been installed, on going to [http://localhost:5601](http://localhost:5601) the login page appears, after logging in the following error message appears:

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

This is not a unique issue and I cannot find a solution

> [@Fail to start Kibana](https://discuss.elastic.co/t/fail-to-start-kibana/120625/4):
>
> Chrome. What about the error message in the log? Will they cause any trouble in subsequent use? Many thanks for your help. Andy

> [@6.2.0 starts with error](https://discuss.elastic.co/t/6-2-0-starts-with-error/118706/11):
>
> I have same problem. Windows 8.1 Enterprise Java 1.8.0\_162 Elastic + Kibana: 6.2.3 I have followed video tutorial and stack in this error: Uncaught TypeError: ace.require is not a function ([http://localhost:5601/bundles/kibana.bundle.js?v=16562:12](http://localhost:5601/bundles/kibana.bundle.js?v=16562:12)) Is it a way to properly and successfully install elastic + kibana under windows ? Regards -Jaret

> [@Kibana 6.2.2 login fails](https://discuss.elastic.co/t/kibana-6-2-2-login-fails/123187):
>
> On logging into kibana I get: Uncaught TypeError: ace.require is not a function ([http://localhost:5601/bundles/kibana.bundle.js?v=16588:1](http://localhost:5601/bundles/kibana.bundle.js?v=16588:1)) My OS is windows 10 but I did not use the .msi. I just unzipped elasticsearch and kibana into c:\opt. I have installed elasticsearch 6.2.2 and added x-pack. I created the keystore and set the passwords for elastic, kibana, and logstash. I added x-pack to kibana. I set the elasticsearch.username and password in the kibana.yml file. I started kibana from…

> [@Kibana 6.1.0. and newer starts with error](https://discuss.elastic.co/t/kibana-6-1-0-and-newer-starts-with-error/111754/56):
>
> I am also having this problem. I installed Version: 6.1.2 Build: 16363 on Windows 10. I tried removing the "optimization" folder but still receive the same error below. I checked folder permissions as well. Any assistance would be greatly appreciated. Error: TypeError: \_reactcss.handleHover is not a function ([http://localhost:5601/bundles/kibana.bundle.js?v=16363:67](http://localhost:5601/bundles/kibana.bundle.js?v=16363:67)) [2132]/window.onerror@[http://localhost:5601/bundles/commons.bundle.js?v=16363:45:8728](http://localhost:5601/bundles/commons.bundle.js?v=16363:45:8728)

[https://github.com/floragunncom/search-guard-kibana-plugin/issues/80](https://github.com/floragunncom/search-guard-kibana-plugin/issues/80)

Things I have tried:

- Elasticsearch SSL or without SSL
- Passwords with only alphanum chars
- Basic License install vs Trial license
- Different Browsers
- Windows 10 & Windows 2012

I have confirmed that the kibana user login is correctly authenticating. (an incorrect user or an incorrect password will not proceed past the login page)

When I have enabled Kibana verbose logging I can see the following:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/6/1/61c1d845efdacd56fd7feba6e936213984297618.png)

Anyone have any ideas please?

---

<div class="post-metadata">

**Author:** ![marnold](https://avatars.discourse-cdn.com/v4/letter/m/f08c70/32.png) [@marnold](https://discuss.elastic.co/u/marnold)\
**Post date:** [April 13, 2018, 1:03pm UTC](https://discuss.elastic.co/t/solved-x-pack-6-2-install-fatal-error-ace-require-is-not-a-function/127890/2 "2018-04-13T13:03:23Z")

</div>

I am having the same issue with ES and Kibana 6.2.3. Also running Windows 10. Elasticsearch installed fine, and setting up x-pack with transport security went fine as well. Also setup the default elastic,kibana,logstash users with passwords as well. Kibana installed fine, and x-pack installed there as well.

Could this be an issue with Windows 10 and v6? Has any one tried down grading to v5?

---

<div class="post-metadata">

**Author:** ![forloop](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/forloop/32/9021_2.png) [@forloop](https://discuss.elastic.co/u/forloop)\
**Post date:** [April 16, 2018, 4:55am UTC](https://discuss.elastic.co/t/solved-x-pack-6-2-install-fatal-error-ace-require-is-not-a-function/127890/3 "2018-04-16T04:55:06Z")

</div>

@AlphaJosh the linked Windows installer issue #166 is not related; would you mind editing the question and removing it, as I think it conflates and confuses the issue.

I just installed both Elasticsearch and Kibana 6.2.3 with X-Pack plugin to see if I could replicate the issue, however I was unable to:

 ![50](https://us1.discourse-cdn.com/elastic/original/3X/0/7/07bc9d2b1c690d576c55ecf5338f1201cb7a3e5a.png)

I'm using an installation PowerShell script for this, which you're also more than welcome to try

> <https://gist.github.com/russcam/ee5293c7ae5bf1fa22de13cbbd2d28c4>

You can run it with

```auto
. { iwr -useb https://gist.githubusercontent.com/russcam/ee5293c7ae5bf1fa22de13cbbd2d28c4/raw/90d8f4f78ae4be1b1fab8796bcb782607d8f60d0/ElasticStack.ps1 } | iex; Install-ElasticStack -Product Elasticsearch,Kibana -Version 6.2.3 -Destination C:\elasticsearch

```

and follow the bootstrap/user password prompts that appear.

**Note:** multi-tabbed console emulators such as [Cmder](http://cmder.net/) _may_ not wait for processes started with `Start-Process <name> -Wait` that spawn new windows with PowerShell to finish, so it's best to run it from a PowerShell terminal, which will.

Let me know if it works for you.

---

<div class="post-metadata">

**Author:** ![clay.greenway](https://avatars.discourse-cdn.com/v4/letter/c/9dc877/32.png) [@clay.greenway](https://discuss.elastic.co/u/clay.greenway)\
**Post date:** [April 16, 2018, 5:19pm UTC](https://discuss.elastic.co/t/solved-x-pack-6-2-install-fatal-error-ace-require-is-not-a-function/127890/4 "2018-04-16T17:19:55Z")

</div>

Encountering the same issue. Found two other discussions on the topic that seem to have stalled:

> [@Kibana 6.1.0. and newer starts with error](https://discuss.elastic.co/t/kibana-6-1-0-and-newer-starts-with-error/111754):
>
> I've upgrade ES 6.0.0 to 6.1.0. The second step was to upgrade Kibana. When I start Kibana I get this error. TypeError: \_reactcss.handleHover is not a function (http://\_SERVER\_:5601/bundles/kibana.bundle.js?v=16337:67) Additional data: Version: 6.1.0 Build: 16337 Error: TypeError: \_reactcss.handleHover is not a function (http://\_SERVER\_:5601/bundles/kibana.bundle.js?v=16337:67) [2134]/window.onerror@http://\_SERVER\_:5601/bundles/commons.bundle.js?v=16337:45:8728 Tried in IE 11 version 11.0.…

> [@6.2.0 starts with error](https://discuss.elastic.co/t/6-2-0-starts-with-error/118706):
>
> Hi The bug that was present in Kibana 6.1.x is also present in 6.2.0 , albeit in a slightly different way,. This time it is present like this Oops! Looks like something went wrong. Refreshing may do the trick. Go back Clear your session Fatal Error Uncaught TypeError: ace.require is not a function ([http://localhost:5601/bundles/kibana.bundle.js?v=16562:1](http://localhost:5601/bundles/kibana.bundle.js?v=16562:1)) Version: 6.2.0 Build: 16562 Error: Uncaught TypeError: ace.require is not a function ([http://localhost:5601/bundles/kibana.bundle.…](http://localhost:5601/bundles/kibana.bundle.js?v=16562:1)

In each discussion, including this one, I believe there are key facts missing to reproduce the issue.

1. For consistency, we are talking about installing/running on Windows.
2. It seems that in each case "installation" of kibana was actually just download and extract the zip file
3. Probably most importantly, we are missing the current directory from which the kibana was executed (the first time, and each subsequent time).

For me, the process was as follows:

1. Download and extract kibana 6.2.3 zip file to a safe location (no spaces in path)
2. Change directory to `bin` folder
3. Run `kibana.bat`
4. Kibana launches, works fine
5. Later, shut down kibana
6. Still in `bin` folder, run `kibana-plugin install x-pack`
7. After installation and config complete, run kibana again with `kibana.bat`
8. Got the error mentioned in the OP, but, I almost immediately realized my error of executing `kibana-plugin` from the bin folder (a `x-pack` folder was created inside bin!)
9. So I did a `kibana-plugin remove x-pack`. Folders got cleaned up.
10. Change directory to kibana root, remove `optimize` folder
11. Run `bin\kibana.bat`
12. From this point forward, no combination of workarounds suggested in the other two discussions help; I always get the "Uncaught TypeError".

I really suspect the key to reproducing the problem has to do with using the windows command prompt shell, and the path from which kibana is executed for the very first time.

---

<div class="post-metadata">

**Author:** ![Kim-Kruse-Hansen](https://avatars.discourse-cdn.com/v4/letter/k/f1d935/32.png) [@Kim-Kruse-Hansen](https://discuss.elastic.co/u/Kim-Kruse-Hansen)\
**Post date:** [April 16, 2018, 5:50pm UTC](https://discuss.elastic.co/t/solved-x-pack-6-2-install-fatal-error-ace-require-is-not-a-function/127890/5 "2018-04-16T17:50:57Z")

</div>

Hi

This has been a known issue on Windows since version 6.1.x. Elastic has apparently not been able to reproduce the error or document what they changed in Kibana 6.1.0.

I have published a workaround that has worked for me on every version from 6.1.0 to currently 6.2.3.

It has to do with how you run kibana bat and from directory you start it as you write yourself.

make sure Kibana is stopped  
Start a fresh prompt in admin mode.  
cd to your kibana root directory  
rd optimize /s /q  
bin\kibana  
wait for it to launch

whether x-pack is installed or not doesnt matter. I follow same steps every time.

This works consistently for me on all my clusters. I have 6 clusters currently. I cannot speak for your particular environment ofc.

Best of luck  
Kim

---

<div class="post-metadata">

**Author:** ![clay.greenway](https://avatars.discourse-cdn.com/v4/letter/c/9dc877/32.png) [@clay.greenway](https://discuss.elastic.co/u/clay.greenway)\
**Post date:** [April 16, 2018, 6:32pm UTC](https://discuss.elastic.co/t/solved-x-pack-6-2-install-fatal-error-ace-require-is-not-a-function/127890/6 "2018-04-16T18:32:03Z")

</div>

Hey Kim, thanks for your contributions to this discussion so far. In fact, I've been carefully following the steps of your work around, but so far I haven't had success (part of the reason for my post).

I plan on starting over with a fresh "install" shortly, and will follow your procedure. I'll post an update.

Thanks again!

---

<div class="post-metadata">

**Author:** ![AlphaJosh](https://avatars.discourse-cdn.com/v4/letter/a/5f8ce5/32.png) [@AlphaJosh](https://discuss.elastic.co/u/AlphaJosh)\
**Post date:** [April 16, 2018, 9:18pm UTC](https://discuss.elastic.co/t/solved-x-pack-6-2-install-fatal-error-ace-require-is-not-a-function/127890/7 "2018-04-16T21:18:16Z")

</div>

SUCCESS!!!!

The powershell script worked! Thank you

`. { iwr -useb https://gist.githubusercontent.com/russcam/ee5293c7ae5bf1fa22de13cbbd2d28c4/raw/90d8f4f78ae4be1b1fab8796bcb782607d8f60d0/ElasticStack.ps1 } | iex; Install-ElasticStack -Product Elasticsearch,Kibana -Version 6.2.3 -Destination C:\elasticsearch`

I started with a completely fresh folder. Though I got an error (which would have been related to my computer: "The term 'Install-ElasticStack' is not recognized"  
So I downloaded the script [https://gist.githubusercontent.com/russcam/ee5293c7ae5bf1fa22de13cbbd2d28c4/raw/90d8f4f78ae4be1b1fab8796bcb782607d8f60d0/ElasticStack.ps1](https://gist.githubusercontent.com/russcam/ee5293c7ae5bf1fa22de13cbbd2d28c4/raw/90d8f4f78ae4be1b1fab8796bcb782607d8f60d0/ElasticStack.ps1)

In powershell I changed to the folder and then ran `.\ElasticStack.ps1` - This loads the install module. Then I ran the actual install:  
Install-ElasticStack -Product Elasticsearch,Kibana -Version 6.2.3 -Destination C:\elk

I had a and followed the prompt for new passwords. I did notice there was prompt about password for a keystore that I hadnt seen before: `bootstrap.password does not exist in keystore`.

At the end I could log onto Kibana with the credentials:  
Username: kibana  
Password: kibana

Thank you, that script NEEDS to be on the offical doco, it would have saved me hours and hours of frustration.

FYI: I had previously tried deleting optimize and reinstalling and that didnt work for me.

---

<div class="post-metadata">

**Author:** ![clay.greenway](https://avatars.discourse-cdn.com/v4/letter/c/9dc877/32.png) [@clay.greenway](https://discuss.elastic.co/u/clay.greenway)\
**Post date:** [April 25, 2018, 2:03pm UTC](https://discuss.elastic.co/t/solved-x-pack-6-2-install-fatal-error-ace-require-is-not-a-function/127890/8 "2018-04-25T14:03:54Z")

</div>

Still no success using your workaround. I don't doubt that it works (probably for most), I'm more inclined to think that something is wrong/off about my environment. I am prototyping an elasticstack setup to demonstrate how the ingestion process works, and how Kibana can be used to view the data, and I'm doing all of this on my dev workstation (Windows).

It seems that the OP is happy with the custom installation powershell script provided by @forloop, but I'm not ready to use an unofficial install-aid from here or elsewhere.

So for now, I'll have to do without x-pack.

---

<div class="post-metadata">

**Author:** ![forloop](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/forloop/32/9021_2.png) [@forloop](https://discuss.elastic.co/u/forloop)\
**Post date:** [April 29, 2018, 12:35pm UTC](https://discuss.elastic.co/t/solved-x-pack-6-2-install-fatal-error-ace-require-is-not-a-function/127890/9 "2018-04-29T12:35:10Z")

</div>

Happy to hear it worked for 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:** [May 27, 2018, 12:35pm UTC](https://discuss.elastic.co/t/solved-x-pack-6-2-install-fatal-error-ace-require-is-not-a-function/127890/10 "2018-05-27T12:35:14Z")

</div>

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