问题描述:
跟着教程配置kibana的开发环境时,运行命令yarn kbn bootstrap
时报如下错误:
Installing dependencies in [@kbn/es]:
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
error An unexpected error occurred: "Reduce of empty array with no initial value".
info If you think this is a bug, please open a bug report with the information provided in "/home/cfischer/kibana/packages/kbn-es/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
[bootstrap] failed:
Error: Command failed: yarn install --non-interactive --mutex file
at makeError (/home/cfischer/kibana/packages/kbn-pm/dist/index.js:44877:9)
at Promise.all.then.arr (/home/cfischer/kibana/packages/kbn-pm/dist/index.js:44982:16)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
解决方案:
这是由于yarn的版本是1.7造成的,安装1.6版本的yarn完美解决了。
版本:
- elasticsearch:6.3.0
- kibana:6.3.0
- node:8.11.3
- yarn:1.6
本人最近在开发kibana插件,包括但不限于:汉化kibana,二次开发kibana,有意一起研究的小伙伴可以加我QQ:820327571(备注kibana)