Error while generating a kibana(7.11.1) plugin

Hello,
I am trying to create a custom kibana, I am following the steps.

I have downloaded the kibana-master as zip.
I have yarn installed on my system also node.js(14.16.0) as per kibana requirements.
When I am running command "yarn kbn bootstrap" I am getting this error.

yarn run v1.22.10
$ node scripts/kbn bootstrap
 succ [bazel_tools] all bazel tools are correctly installed
 info [kibana] running yarn

$ node ./preinstall_check
[1/5] Validating package.json...
[2/5] Resolving packages...
warning Resolution field "trim@0.0.3" is incompatible with requested version "trim@0.0.1"
warning Resolution field "trim@0.0.3" is incompatible with requested version "trim@0.0.1"
warning Resolution field "@types/node@14.14.14" is incompatible with requested version "@types/node@^12.0.2"
warning Resolution field "@types/node@14.14.14" is incompatible with requested version "@types/node@8.10.54"
warning Resolution field "typescript@4.1.3" is incompatible with requested version "typescript@~3.7.2"
warning Resolution field "typescript@4.1.3" is incompatible with requested version "typescript@^3.5.3"
warning Resolution field "typescript@4.1.3" is incompatible with requested version "typescript@^3.2.2"
warning Resolution field "schema-utils@1.0.0" is incompatible with requested version "schema-utils@^0.3.0"
warning Resolution field "trim@0.0.3" is incompatible with requested version "trim@0.0.1"
warning Resolution field "trim@0.0.3" is incompatible with requested version "trim@0.0.1"
warning Resolution field "typescript@4.1.3" is incompatible with requested version "typescript@^3.3.3333"
warning Resolution field "trim@0.0.3" is incompatible with requested version "trim@0.0.1"
[3/5] Fetching packages...
info fsevents@2.1.2: The platform "win32" is incompatible with this module.
info "fsevents@2.1.2" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
warning " > @elastic/apm-rum-react@1.2.5" has incorrect peer dependency "react-router-dom@^4.0.0".
warning " > @elastic/charts@25.0.1" has incorrect peer dependency "moment@^2.29.1".
warning " > @elastic/charts@25.0.1" has incorrect peer dependency "moment-timezone@^0.5.32".
warning "@octokit/rest > @octokit/plugin-request-log@1.0.2" has unmet peer dependency "@octokit/core@>=3".
warning "@storybook/addon-docs > @mdx-js/react@1.6.16" has incorrect peer dependency "react@^16.13.1".
warning " > react-monaco-editor@0.41.2" has incorrect peer dependency "@types/react@^17.x".
warning " > react-monaco-editor@0.41.2" has incorrect peer dependency "react@^17.x".
warning " > react-shortcuts@2.0.1" has incorrect peer dependency "react@^0.14.8 || ^15".
warning " > react-shortcuts@2.0.1" has incorrect peer dependency "react-dom@^0.14.8 || ^15".
[5/5] Building fresh packages...

 succ yarn.lock analysis completed without any issues
 info [bazel] Starting local Bazel server and connecting to it...
 info [bazel] ... still trying to connect to local Bazel server after 10 seconds ...
 info [bazel] INFO: Invocation ID: 14051210-2519-4d27-bc84-21b231934148
 info [bazel] INFO: Analyzed target //packages:build (1 packages loaded, 1 target configured).
 info [bazel] INFO: Found 1 target...
 info [bazel] ERROR: <builtin>: BazelWorkspaceStatusAction stable-status.txt failed: Failed to determine workspace status: Process exited with status 1
 info [bazel] INFO: Elapsed time: 21.979s, Critical Path: 2.09s
 info [bazel] INFO: 1 process: 1 internal.
 info [bazel]
ERROR [bootstrap] failed:
ERROR Error: Command failed with exit code 1: bazel build //packages:build
      Starting local Bazel server and connecting to it...
      ... still trying to connect to local Bazel server after 10 seconds ...
      INFO: Invocation ID: 14051210-2519-4d27-bc84-21b231934148
      INFO: Analyzed target //packages:build (1 packages loaded, 1 target configured).
      INFO: Found 1 target...
      ERROR: <builtin>: BazelWorkspaceStatusAction stable-status.txt failed: Failed to determine workspace status: Process exited with status 1
      INFO: Elapsed time: 21.979s, Critical Path: 2.09s
      INFO: 1 process: 1 internal.

          at makeError (E:\kibana\packages\kbn-pm\dist\index.js:34983:11)
          at handlePromise (E:\kibana\packages\kbn-pm\dist\index.js:33917:26)
          at processTicksAndRejections (internal/process/task_queues.js:93:5)
          at async runBazel (E:\kibana\packages\kbn-pm\dist\index.js:48228:3)
          at async Object.run (E:\kibana\packages\kbn-pm\dist\index.js:8942:5)
          at async runCommand (E:\kibana\packages\kbn-pm\dist\index.js:59437:5)
          at async Module.run (E:\kibana\packages\kbn-pm\dist\index.js:238:3)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

What should I do?

@Saurabh_Patil looks like you're running this on Windows right? For Windows development we require you to run the scripts in the Git bash for windows or in any bash emulator. Are you doing it? You can also add a log at kibana/bazel_workspace_status.js at master · elastic/kibana · GitHub and run node src/dev/bazel_workspace_status.js to see why is that script failing. I believe you probably don't have git installed on the path or so.

In any case we will fix that hard error output at [Bazel] More resilient Workspace Status by tylersmalley · Pull Request #93244 · elastic/kibana · GitHub

1 Like

Hello @tiagocosta, thank you for telling me about using bash, I was using cmd. So, I ran it using git bash but this time it gave another error. So can you please help with it. Thanks again.

$ yarn kbn bootstrap
yarn run v1.22.10
$ node scripts/kbn bootstrap
 succ [bazel_tools] all bazel tools are correctly installed
 info [kibana] running yarn

$ node ./preinstall_check
[1/5] Validating package.json...
[2/5] Resolving packages...
warning Resolution field "trim@0.0.3" is incompatible with requested version "trim@0.0.1"
warning Resolution field "trim@0.0.3" is incompatible with requested version "trim@0.0.1"
warning Resolution field "@types/node@14.14.14" is incompatible with requested version "@types/node@^12.0.2"
warning Resolution field "@types/node@14.14.14" is incompatible with requested version "@types/node@8.10.54"
warning Resolution field "typescript@4.1.3" is incompatible with requested version "typescript@~3.7.2"
warning Resolution field "typescript@4.1.3" is incompatible with requested version "typescript@^3.5.3"
warning Resolution field "typescript@4.1.3" is incompatible with requested version "typescript@^3.2.2"
warning Resolution field "schema-utils@1.0.0" is incompatible with requested version "schema-utils@^0.3.0"
warning Resolution field "trim@0.0.3" is incompatible with requested version "trim@0.0.1"
warning Resolution field "trim@0.0.3" is incompatible with requested version "trim@0.0.1"
warning Resolution field "typescript@4.1.3" is incompatible with requested version "typescript@^3.3.3333"
warning Resolution field "trim@0.0.3" is incompatible with requested version "trim@0.0.1"
success Already up-to-date.

 succ yarn.lock analysis completed without any issues
 info [bazel] Starting local Bazel server and connecting to it...
 info [bazel] ... still trying to connect to local Bazel server after 10 seconds ...
 info [bazel] INFO: Invocation ID: bd708573-6218-45d9-a160-7390b83e54af
 info [bazel] INFO: Analyzed target //packages:build (1 packages loaded, 1 target configured).
 info [bazel] INFO: Found 1 target...
 info [bazel] INFO: Elapsed time: 22.453s, Critical Path: 0.91s
 info [bazel] INFO: 1 process: 1 internal.
 info [bazel]
ERROR [bootstrap] failed:
ERROR Error: Command failed with exit code 128: git log -n 1 --pretty=format:%H -- E:\kibana
      fatal: your current branch 'master' does not have any commits yet
          at makeError (E:\kibana\packages\kbn-pm\dist\index.js:34983:11)
          at handlePromise (E:\kibana\packages\kbn-pm\dist\index.js:33917:26)
          at processTicksAndRejections (internal/process/task_queues.js:93:5)
          at async getLatestSha (E:\kibana\packages\kbn-pm\dist\index.js:37088:7)
          at async getChecksum (E:\kibana\packages\kbn-pm\dist\index.js:37099:15)
          at async E:\kibana\packages\kbn-pm\dist\index.js:37166:33
          at async Promise.all (index 0)
          at async getAllChecksums (E:\kibana\packages\kbn-pm\dist\index.js:37165:3)
          at async Object.run (E:\kibana\packages\kbn-pm\dist\index.js:8951:23)
          at async runCommand (E:\kibana\packages\kbn-pm\dist\index.js:59437:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@Saurabh_Patil can you please use the last master changes? I believe your problem will be solved with it.

Cheers

@tiagocosta
I used the last master. Yarn issues have been resolved but now it's giving this error

 info [bazel] INFO: 1 process: 1 internal.
 info [bazel]
 succ yarn.lock analysis completed without any issues
ERROR [bootstrap] failed:
ERROR Error: Command failed with exit code 128: git log -n 1 --pretty=format:%H -- E:\kibana
      fatal: your current branch 'master' does not have any commits yet
          at makeError (E:\kibana\packages\kbn-pm\dist\index.js:35021:11)
          at handlePromise (E:\kibana\packages\kbn-pm\dist\index.js:33955:26)
          at processTicksAndRejections (internal/process/task_queues.js:93:5)
          at async getLatestSha (E:\kibana\packages\kbn-pm\dist\index.js:37126:7)
          at async getChecksum (E:\kibana\packages\kbn-pm\dist\index.js:37137:15)
          at async E:\kibana\packages\kbn-pm\dist\index.js:37204:33
          at async Promise.all (index 0)
          at async getAllChecksums (E:\kibana\packages\kbn-pm\dist\index.js:37203:3)
          at async Object.run (E:\kibana\packages\kbn-pm\dist\index.js:8972:23)
          at async runCommand (E:\kibana\packages\kbn-pm\dist\index.js:59511:5)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Should I clone the repo or it is fine to use the downloaded zip?

@Saurabh_Patil please try to clone the repo and let me know

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