1. 程式人生 > >kibana 5.5 源碼編譯踩坑記錄

kibana 5.5 源碼編譯踩坑記錄

version echo regress ase https 記錄 arch 開發 iba

由於項目需要定制開發kibana,因此需要編譯kibana,在開發環境下運行。 註意:必須下載kibana 5.5的源碼才能正常編譯,下載release或者snapshot版本是不行的,運行npm start會因為無scripts目錄報錯。

Setting Up kibana Development Environment

Fork, then clone the kibana repo and change directory into it

下載kibana5.5源碼解壓後
cd kibana
記得還要 git 初始化下,因為build時候依賴.git目錄。

Install the version of node.js listed in the .node-version file (this can be easily automated with tools such as nvm and avn)

nvm install "$(cat .node-version)"
註:沒有的話就自己生成一個
.node-version,寫入6.11.1

Install npm dependencies

npm install
註意:npm --registry https://registry.npm.taobao.org install 用國內源加速

Start elasticsearch. 啟動es,然後

npm start
當改動src目錄後, 它會主動監測改動,重新啟動web服務。然後訪問localhost:5601就可以看到效果了。 補充: npm run build就可以編譯打包,發布的話,貌似是npm run release。具體可以看package.json裏的scripts:
  "scripts": {
    "test": "grunt test",
    "test:dev": "grunt test:dev",
    "test:quick": "grunt test:quick
", "test:browser": "grunt test:browser", "test:ui": "grunt test:ui", "test:ui:server": "grunt test:ui:server", "test:ui:runner": "echo ‘use `node scripts/functional_test_runner`‘ && false", "test:server": "grunt test:server", "test:coverage": "grunt test:coverage", "test:visualRegression": "grunt test:visualRegression:buildGallery", "checkLicenses": "grunt licenses", "build": "grunt build", "release": "grunt release", "start": "sh ./bin/kibana --dev", "precommit": "grunt precommit", "karma": "karma start", "elasticsearch": "grunt esvm:dev:keepalive", "lint": "grunt eslint:source", "lintroller": "grunt eslint:fixSource", "makelogs": "echo ‘use `node scripts/makelogs`‘ && false", "mocha": "echo ‘use `node scripts/mocha`‘ && false", "sterilize": "grunt sterilize", "uiFramework:start": "grunt uiFramework:start", "uiFramework:build": "grunt uiFramework:build" },

kibana 5.5 源碼編譯踩坑記錄