Build kibana in windows 10


(radi) #1

Hello,

I want to build Kibana 5.4.0 locally from sources on Windows 10 machine.
I found the procedure for linux not yet for windows

if someone test the build kibana running on windows, Please provide the proper steps to prepare the builds if it's working

thanks & regards,
radi


Build Kibana 5.6.4 release packages on Windows 7/Windows Server 2012
(Brandon Kobel) #2

Hey @radi, is there a specific step in the Contributing Guide that doesn't work on Windows? Also, you shouldn't need to normally build Kibana from source but should be able to download an already built version from https://www.elastic.co/downloads/past-releases


(Krunal Kalaria) #3

Hey @radi,

https://www.elastic.co/downloads

you can download the .zip for windows from the above link and in this steps also given how to start the ELK Stack in windows.

Regards,
Krunal.


(radi) #4

hi, @Krunal_kalaria @Brandon_Kobel
Thank's for your replay but i already download zip and run it in windows and it's work fine for me
but what i want it's the procedure to build project after modification in code ( I want add new plugin developping visulaization ) it's why i need to build source code in windows

Regards,
radi


(Brandon Kobel) #6

@radi the Contributing Guide has that information, if a specific step doesn't work with Windows please let me know and I can open up an issue to correct it.


(radi) #7

@Brandon_Kobel
That part it's not clear !,
On Windows, you'll need you use Git Bash, Cygwin, or a similar shell that exposes the sh command. And to successfully build you'll need Cygwin optional packages zip, tar, and shasum.

in windows 10 i add Bash Ubuntu in Windows but i don't see Kibana folder when i add it in file /home/test
i anlay have . .. .bash_history .bash_logout .bashrc .cache .profile
how can i acces to kibana directory !!?


(Brandon Kobel) #8

@radi the Windows Subsystem for Linux by default mounts your C: under /mnt/c/


(radi) #9

@Brandon_Kobel [quote="Brandon_Kobel, post:8, topic:115054"]
the Windows Subsystem for Linux by default mounts your C: under /mnt/c/
[/quote]

in bash windows i have this error

PC:/mnt/c/kibana-5.4.0-windows$ yarn start
ERROR: [Errno 2] No such file or directory: 'start'

and
PC:/mnt/c/kibana-5.4.0-windows$ yarn build
ERROR: [Errno 2] No such file or directory: 'build'

PC:/mnt/c/kibana-5.4.0-windows$ yarn --version
0.10


(Brandon Kobel) #10

Kibana 5.4 is still using npm as opposed to yarn. https://github.com/elastic/kibana/blob/5.4/CONTRIBUTING.md should have the specific commands for 5.4


(radi) #11

@Brandon_Kobel
when i run npm start i have no error but don't kibana in http://localhost:5601
PC:/mnt/c/kibana-5.4.0-windows-x86# npm start
PC:/mnt/c/kibana-5.4.0-windows-x86# > ./bin/kibana

sh: 1: ./bin/kibana: not found
npm ERR! weird error 127
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

this the scripts add to package.json
"scripts": {
"start": "./bin/kibana"

},
"repository": {
"type": "git",
"url": "https://github.com/elastic/kibana.git"
},
"engines": {
"node": "6.10.2"
}
}

I don't see what I missed, the npm strat it's not the probleme i run kibana with ( click in bin) but the build !!! it's the big probleme !!!

for build errors :
pc:/mnt/c/kibana-5.4.0-windows-x86# npm run build -- --debug
npm ERR! Linux 3.4.0+
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "build" "--" "--debug"
npm ERR! node v6.12.3
npm ERR! npm v3.10.10

npm ERR! missing script: build
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues

npm ERR! Please include the following file with any support request:
npm ERR! /mnt/c/kibana-5.4.0-windows-x86/npm-debug.log

Regards,
radi


(Brandon Kobel) #12

@radio does /mnt/c/kibana-5.4.0-windows-x86 contain the Kibana source code? You shouldn't have to add anything to a package.json file to be able to run npm start.


(radi) #13

Hi, @Brandon_Kobel
yes, /mnt/c/kibana-5.4.0-windows-x86 contain the Kibana source code
and this is my package.json of code with no add :
{
"name": "kibana",
"description": "Kibana is an open source (Apache Licensed), browser based analytics and search dashboard for Elasticsearch. Kibana is a snap to setup and start using. Kibana strives to be easy to get started with, while also being flexible and powerful, just like Elasticsearch.",
"keywords": [
"kibana",
"elasticsearch",
"logstash",
"analytics",
"visualizations",
"dashboards",
"dashboarding"
],
"version": "5.4.0",
"build": {
"number": 15063,
"sha": "75afc9fbb024df55fa01acd1a4c2f76d44961746"
},
"repository": {
"type": "git",
"url": "https://github.com/elastic/kibana.git"
},
"engines": {
"node": "6.10.2"
}
}

when i build my project i have this error:

root@PC:/mnt/c/kibana-5.4.0-windows-x86# npm run build -- --debug
npm ERR! Linux 3.4.0+
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "build" "--" "--debug"
npm ERR! node v6.12.3
npm ERR! npm v3.10.10

npm ERR! missing script: build
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues

npm ERR! Please include the following file with any support request:
npm ERR! /mnt/c/kibana-5.4.0-windows-x86/npm-debug.log


(radi) #14

hi, @Brandon_Kobel
it's work i have the build with no errors after adding this in package.json
"scripts": {
"build": " run build"
}
root@PC:/mnt/c/kibana-5.4.0-windows-x86# npm build --debug
root@PC:/mnt/c/kibana-5.4.0-windows-x86#

Just to make sur that my build is working ,I need to check something to confirm that ?? .


(Brandon Kobel) #15

@radi that package.json looks drastically different than the one in GitHub here. How did you get the Kibana source code?


(radi) #16

@Brandon_Kobel Unfortunately I was using the source of steup not githup...


(radi) #17

@Brandon_Kobel
now that I'm using the githup source https://github.com/elastic/kibana/tree/5.4 I have an error when I install npm dont' work so i do install with git
but i have errors with npm start

root@PC:/mnt/c/kibana-5.4# npm start

kibana@5.4.4 start /mnt/c/kibana-5.4
sh ./bin/kibana --dev

FATAL CLI ERROR Error: Cannot find module 'wreck'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (/mnt/c/kibana-5.4/node_modules/even-better/lib/monitor.js:11:13)
at Module._compile (module.js:570:32)
at Module._extensions..js (module.js:579:10)
at Object.require.extensions.(anonymous function) [as .js] (/mnt/c/kibana-5.4/node_modules/babel-register/lib/node.js:152:7)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (/mnt/c/kibana-5.4/node_modules/even-better/lib/index.js:2:15)
at Module._compile (module.js:570:32)
at Module._extensions..js (module.js:579:10)
at Object.require.extensions.(anonymous function) [as .js] (/mnt/c/kibana-5.4/node_modules/babel-register/lib/node.js:152:7)

npm ERR! Linux 3.4.0+
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "start"
npm ERR! node v6.12.3
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! kibana@5.4.4 start: sh ./bin/kibana --dev
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the kibana@5.4.4 start script 'sh ./bin/kibana --dev'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, 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! sh ./bin/kibana --dev
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 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! /mnt/c/kibana-5.4/npm-debug.log


(system) #18

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