# How can build Kibana 4.2 on windows Machine?

**URL:** <https://discuss.elastic.co/t/how-can-build-kibana-4-2-on-windows-machine/29139>\
**Category:** Kibana\
**Created:** [September 11, 2015, 12:42pm UTC](https://discuss.elastic.co/t/how-can-build-kibana-4-2-on-windows-machine/29139 "2015-09-11T12:42:20Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Santhosh\_Varala](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@Santhosh\_Varala](https://discuss.elastic.co/u/Santhosh_Varala)\
**Post date:** [September 11, 2015, 12:42pm UTC](https://discuss.elastic.co/t/how-can-build-kibana-4-2-on-windows-machine/29139/1 "2015-09-11T12:42:20Z")

</div>

Hi,

I want to build Kibana from 4.2 sources on Windows 8.1 machine. But it is giving errors.  
Please provide the proper steps to prepare the builds.

thanks & regards,  
Santhosh

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [September 11, 2015, 1:15pm UTC](https://discuss.elastic.co/t/how-can-build-kibana-4-2-on-windows-machine/29139/2 "2015-09-11T13:15:12Z")

</div>

If you told us what errors you're getting it would be easier to help you.

---

<div class="post-metadata">

**Author:** ![Santhosh\_Varala](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@Santhosh\_Varala](https://discuss.elastic.co/u/Santhosh_Varala)\
**Post date:** [September 11, 2015, 2:20pm UTC](https://discuss.elastic.co/t/how-can-build-kibana-4-2-on-windows-machine/29139/3 "2015-09-11T14:20:07Z")

</div>

I have ran npm run build. But it is following error  
kibana@4.2.0-snapshot build E:\workspace-eclipse\Kibana  
grunt build

unning "\_build:shrinkwrap:ensureExists:true" (\_build:shrinkwrap:ensureExists) t  
sk

> npm shrinkwrap --dev --loglevel error  
> arning: spawnSync npm ENOENT Use --force to continue.

borted due to warnings.

pm ERR! Windows\_NT 6.3.9600  
pm ERR! argv "D:\nodejs\node.exe" "C:\Users\santhosh\AppData\Roaming\npm  
\node\_modules\npm\bin\npm-cli.js" "run" "build"  
pm ERR! node v4.0.0  
pm ERR! npm v3.2.2  
pm ERR! code ELIFECYCLE  
pm ERR! kibana@4.2.0-snapshot build: `grunt build `  
pm ERR! Exit status 3  
pm ERR!  
pm ERR! Failed at the kibana@4.2.0-snapshot build script 'grunt build '.  
pm ERR! This is most likely a problem with the kibana package,  
pm ERR! not with npm itself.  
pm ERR! Tell the author that this fails on your system:  
pm ERR! grunt build  
pm ERR! You can get their info via:  
pm ERR! npm owner ls kibana  
pm ERR! There is likely additional logging output above.

pm ERR! Please include the following file with any support request:  
pm ERR! E:\workspace-eclipse\Kibana\npm-debug.log

---

<div class="post-metadata">

**Author:** ![Santhosh\_Varala](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@Santhosh\_Varala](https://discuss.elastic.co/u/Santhosh_Varala)\
**Post date:** [September 14, 2015, 5:57am UTC](https://discuss.elastic.co/t/how-can-build-kibana-4-2-on-windows-machine/29139/4 "2015-09-14T05:57:17Z")

</div>

Can anybody helps on this issue?

---

<div class="post-metadata">

**Author:** ![jordansissel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jordansissel/32/44957_2.png) [@jordansissel](https://discuss.elastic.co/u/jordansissel)\
**Post date:** [September 15, 2015, 3:20am UTC](https://discuss.elastic.co/t/how-can-build-kibana-4-2-on-windows-machine/29139/5 "2015-09-15T03:20:57Z")

</div>

I've never tried building Kibana on Windows.

I'm not trying to derail you, but is there something wrong about the Windows releases of Kibana that we publish? Can you not use those? Maybe using our releases of Kibana for Windows could help you until the build problems you experience are resolved?

---

<div class="post-metadata">

**Author:** ![Santhosh\_Varala](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@Santhosh\_Varala](https://discuss.elastic.co/u/Santhosh_Varala)\
**Post date:** [September 15, 2015, 8:33am UTC](https://discuss.elastic.co/t/how-can-build-kibana-4-2-on-windows-machine/29139/6 "2015-09-15T08:33:08Z")

</div>

Idea is, I want to customize the Kibana according to my needs. But release one is optimized generated code.  
So if i want to change anything i need to touch the source code.  
So for modified changes i can build Kibana out of it.

Please help in this regard or suggest any other alternative

---

<div class="post-metadata">

**Author:** ![tbragin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tbragin/32/45166_2.png) [@tbragin](https://discuss.elastic.co/u/tbragin)\
**Post date:** [September 15, 2015, 3:54pm UTC](https://discuss.elastic.co/t/how-can-build-kibana-4-2-on-windows-machine/29139/7 "2015-09-15T15:54:55Z")

</div>

@Santhosh_Varala Building Kibana is currently only supported on Linux and OSX. So if you want to make changes to Kibana source code, you'll have to build it on a supported OS.

Also, if you'd like to submit a pull request to make the build process work on Windows, we'd be open to reviewing it, as we are not currently working on that.

---

<div class="post-metadata">

**Author:** ![Santhosh\_Varala](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@Santhosh\_Varala](https://discuss.elastic.co/u/Santhosh_Varala)\
**Post date:** [September 16, 2015, 8:55am UTC](https://discuss.elastic.co/t/how-can-build-kibana-4-2-on-windows-machine/29139/8 "2015-09-16T08:55:17Z")

</div>

Is the build process works on Centos 6.5 ?

---

<div class="post-metadata">

**Author:** ![alvarezdaniel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alvarezdaniel/32/4500_2.png) [@alvarezdaniel](https://discuss.elastic.co/u/alvarezdaniel)\
**Post date:** [September 17, 2015, 12:29pm UTC](https://discuss.elastic.co/t/how-can-build-kibana-4-2-on-windows-machine/29139/9 "2015-09-17T12:29:41Z")

</div>

Some time ago I tried to do it, with successful results. I'll document the environment changes I did so as to build it in Windows.

---

<div class="post-metadata">

**Author:** ![probaner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/probaner/32/36143_2.png) [@probaner](https://discuss.elastic.co/u/probaner)\
**Post date:** [March 22, 2016, 12:54pm UTC](https://discuss.elastic.co/t/how-can-build-kibana-4-2-on-windows-machine/29139/10 "2016-03-22T12:54:52Z")

</div>

Can any 1 point to Kibana Source which was successfully build on Windows.

---

<div class="post-metadata">

**Author:** ![LeeDr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leedr/32/9289_2.png) [@LeeDr](https://discuss.elastic.co/u/LeeDr)\
**Post date:** [March 24, 2016, 6:03pm UTC](https://discuss.elastic.co/t/how-can-build-kibana-4-2-on-windows-machine/29139/11 "2016-03-24T18:03:03Z")

</div>

You can run from source on Windows (I do), and so you can use it and/or modify/contribute/etc, but you can't actually build kibana release packages on Windows yet.

There is a PR that you might be able to follow along with and get the build to work on Windows;

> <https://github.com/elastic/kibana/pull/6267>

---

<div class="post-metadata">

**Author:** ![probaner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/probaner/32/36143_2.png) [@probaner](https://discuss.elastic.co/u/probaner)\
**Post date:** [March 24, 2016, 6:25pm UTC](https://discuss.elastic.co/t/how-can-build-kibana-4-2-on-windows-machine/29139/12 "2016-03-24T18:25:48Z")

</div>

Thanks Lee,  
Which source you cloned? And what are the prerequisites for running it from  
eclipse. Can you outline if possible? Thanks once more for quick reply.

---

<div class="post-metadata">

**Author:** ![LeeDr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leedr/32/9289_2.png) [@LeeDr](https://discuss.elastic.co/u/LeeDr)\
**Post date:** [March 24, 2016, 6:39pm UTC](https://discuss.elastic.co/t/how-can-build-kibana-4-2-on-windows-machine/29139/13 "2016-03-24T18:39:53Z")

</div>

I'm using [https://github.com/elastic/kibana](https://github.com/elastic/kibana) (master branch)

Refer to; [https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md)

On Windows, you'll need to install node (4.3.2 is our current version for Kibana master) for windows from [https://nodejs.org/download/release/v4.3.2/](https://nodejs.org/download/release/v4.3.2/)

Install gitbash.

Using gitbash shell, in your git clone'd kibana directory, run `npm install`

Then `./bin/kibana`

(Of course you need Elasticsearch running too)

---

<div class="post-metadata">

**Author:** ![LeeDr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leedr/32/9289_2.png) [@LeeDr](https://discuss.elastic.co/u/LeeDr)\
**Post date:** [March 24, 2016, 6:40pm UTC](https://discuss.elastic.co/t/how-can-build-kibana-4-2-on-windows-machine/29139/14 "2016-03-24T18:40:57Z")

</div>

I'm not sure how to run it from Eclipse.

---

<div class="post-metadata">

**Author:** ![probaner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/probaner/32/36143_2.png) [@probaner](https://discuss.elastic.co/u/probaner)\
**Post date:** [March 28, 2016, 11:21am UTC](https://discuss.elastic.co/t/how-can-build-kibana-4-2-on-windows-machine/29139/15 "2016-03-28T11:21:07Z")

</div>

Thanks Lee for the guidance. I was able to build it. But now the problem  
is: this kibana needs ElasticSearch 5.0.0. See the screenshot below. Do you  
have pointer to ES 5.0.0? Let me know. Actually I am on the way of creating  
Kibana plugin , all these are part of environment set-up for that.

 ![](https://us1.discourse-cdn.com/elastic/original/2X/3/3cb0da63914fb20b463f704a7914a487f638d767.png)

---

<div class="post-metadata">

**Author:** ![LeeDr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leedr/32/9289_2.png) [@LeeDr](https://discuss.elastic.co/u/LeeDr)\
**Post date:** [March 28, 2016, 2:49pm UTC](https://discuss.elastic.co/t/how-can-build-kibana-4-2-on-windows-machine/29139/16 "2016-03-28T14:49:04Z")

</div>

You might have to build Elasticsearch 5.0 from source [https://github.com/elastic/elasticsearch/](https://github.com/elastic/elasticsearch/)

There's some instructions `gradle build` in the README.textile in that repository.

I might be able to send you a link to a 5.0 snapshot build. What OS are you running Elasticsearch on (locally on Windows)?

Thanks,  
Lee

---

<div class="post-metadata">

**Author:** ![LeeDr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leedr/32/9289_2.png) [@LeeDr](https://discuss.elastic.co/u/LeeDr)\
**Post date:** [March 28, 2016, 3:43pm UTC](https://discuss.elastic.co/t/how-can-build-kibana-4-2-on-windows-machine/29139/17 "2016-03-28T15:43:05Z")

</div>

You should also be able to start elasticsearch 5.0 snapshot from your Kibana checkout with `esvm --branch master`.

If you don't have esvm install it with `npm install -g esvm`.

Thanks,  
Lee

---

<div class="post-metadata">

**Author:** ![probaner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/probaner/32/36143_2.png) [@probaner](https://discuss.elastic.co/u/probaner)\
**Post date:** [March 29, 2016, 8:23am UTC](https://discuss.elastic.co/t/how-can-build-kibana-4-2-on-windows-machine/29139/18 "2016-03-29T08:23:40Z")

</div>

kindly send the link for snapshot build. Here are the details of  
local windows.

![](https://us1.discourse-cdn.com/elastic/original/2X/d/dab582a7501dea359e4941ebd58a9b59b0e5eec8.png)  
 ![](https://us1.discourse-cdn.com/elastic/original/2X/1/1766c517296083165dc30922ac24a70488a7c62d.png)

---

<div class="post-metadata">

**Author:** ![probaner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/probaner/32/36143_2.png) [@probaner](https://discuss.elastic.co/u/probaner)\
**Post date:** [March 31, 2016, 8:45am UTC](https://discuss.elastic.co/t/how-can-build-kibana-4-2-on-windows-machine/29139/19 "2016-03-31T08:45:31Z")

</div>

Getting this error while I start elasticsearch server from Kibana check outs even after installing esvm:

```
C:\Users\eprbane\elastic\kibana>npm run elasticsearch

> kibana@5.0.0-snapshot elasticsearch C:\Users\eprbane\elastic\kibana
> grunt esvm:dev:keepalive

Running "esvm:dev:keepalive" (esvm) task
starting up "dev" cluster
Keeping elasticsearch alive, to shutdown press command/control+c
INFO - - cluster - Downloading & installing from "master" branch.
INFO - - cluster - Installing plugins
INFO - - cluster - Starting 1 nodes
Fatal error: Cannot read property 'split' of undefined

npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "run" "elasticsearch"
npm ERR! node v4.4.1
npm ERR! npm v2.14.20
npm ERR! code ELIFECYCLE
npm ERR! kibana@5.0.0-snapshot elasticsearch: `grunt esvm:dev:keepalive`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the kibana@5.0.0-snapshot elasticsearch script 'grunt esvm:de
v:keepalive'.
npm ERR! This is most likely a problem with the kibana package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! grunt esvm:dev:keepalive
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs kibana
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls kibana
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\eprbane\elastic\kibana\npm-debug.log

C:\Users\eprbane\elastic\kibana>
```

---

<div class="post-metadata">

**Author:** ![Meenal.Luktuke](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/meenal.luktuke/32/7795_2.png) [@Meenal.Luktuke](https://discuss.elastic.co/u/Meenal.Luktuke)\
**Post date:** [May 9, 2016, 3:12pm UTC](https://discuss.elastic.co/t/how-can-build-kibana-4-2-on-windows-machine/29139/20 "2016-05-09T15:12:44Z")

</div>

I just did a build of kibana from source code. Check the following

1. git clone the kibana repository
2. npm install
3. npm run elasticsearch
4. check write + execute permission on \<\>\kibana\optimize.babelcache.json and \<\>\kibana\optimize\bundles
5. run Git bash and execute npm start from \<\>\kibana

[Next page](https://discuss.elastic.co/t/how-can-build-kibana-4-2-on-windows-machine/29139.md?page=2)
