elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.71k stars 8.13k forks source link

uiFramework fails to start on windows #9911

Closed BigFunger closed 7 years ago

BigFunger commented 7 years ago

Seems to have been introduced in https://github.com/elastic/kibana/pull/9803.

Output from console

> kibana@5.3.0 uiFramework:start C:\code\kibana
> grunt uiFramework:start

Running "uiFramework:start" task
Fatal error: spawn .\node_modules\.bin\webpack-dev-server ENOENT

npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "uiFramework:start"
npm ERR! node v6.9.0
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! kibana@5.3.0 uiFramework:start: `grunt uiFramework:start`
npm ERR! Exit status 3
npm ERR!
npm ERR! Failed at the kibana@5.3.0 uiFramework:start script 'grunt uiFramework:start'.
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!     grunt uiFramework:start
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!     C:\code\kibana\npm-debug.log
BigFunger commented 7 years ago

potential fix: https://github.com/elastic/kibana/blob/master/tasks/ui_framework.js#L16

changing:

cmd: /^win/.test(platform) ? '.\\node_modules\\.bin\\webpack-dev-server' : './node_modules/.bin/webpack-dev-server',

to

cmd: /^win/.test(platform) ? '.\\node_modules\\.bin\\webpack-dev-server.cmd' : './node_modules/.bin/webpack-dev-server',

made it work on my system.