Kibana plugin development environment

Hello,

I've just download the latest kibana from Github and running on Ubuntu 18.04.

I am following the setup process (Getting started | Kibana Guide [7.12] | Elastic), but I have an error when I run yarn kbn bootstrap

There following is the output of the above command:

yarn run v1.22.10
$ node scripts/kbn bootstrap
 succ [bazel_tools] all bazel tools are correctly installed
 info [bazel] INFO: Invocation ID: 09901931-a065-4859-afbd-12f3fb29768c
 info [bazel] INFO: Analyzed target //packages:build (1 packages loaded, 139 targets configured).
 info [bazel] INFO: Found 1 target...
 info [bazel] Target //packages:build up-to-date:
 info [bazel]   bazel-bin/packages/elastic-datemath/npm_module
 info [bazel]   bazel-bin/packages/elastic-eslint-config-kibana/npm_module
 info [bazel]   bazel-bin/packages/elastic-safer-lodash-set/npm_module
 info [bazel]   bazel-bin/packages/kbn-ace/npm_module
 info [bazel]   bazel-bin/packages/kbn-analytics/npm_module
 info [bazel]   bazel-bin/packages/kbn-apm-config-loader/npm_module
 info [bazel]   bazel-bin/packages/kbn-apm-utils/npm_module
 info [bazel]   bazel-bin/packages/kbn-babel-code-parser/npm_module
 info [bazel]   bazel-bin/packages/kbn-babel-preset/npm_module
 info [bazel]   bazel-bin/packages/kbn-config/npm_module
 info [bazel]   bazel-bin/packages/kbn-config-schema/npm_module
 info [bazel]   bazel-bin/packages/kbn-crypto/npm_module
 info [bazel]   bazel-bin/packages/kbn-dev-utils/npm_module
 info [bazel]   bazel-bin/packages/kbn-es/npm_module
 info [bazel]   bazel-bin/packages/kbn-eslint-import-resolver-kibana/npm_module
 info [bazel]   bazel-bin/packages/kbn-eslint-plugin-eslint/npm_module
 info [bazel]   bazel-bin/packages/kbn-expect/npm_module
 info [bazel]   bazel-bin/packages/kbn-legacy-logging/npm_module
 info [bazel]   bazel-bin/packages/kbn-logging/npm_module
 info [bazel]   bazel-bin/packages/kbn-plugin-generator/npm_module
 info [bazel]   bazel-bin/packages/kbn-securitysolution-constants/npm_module
 info [bazel]   bazel-bin/packages/kbn-securitysolution-io-ts-utils/npm_module
 info [bazel]   bazel-bin/packages/kbn-securitysolution-utils/npm_module
 info [bazel]   bazel-bin/packages/kbn-securitysolution-es-utils/npm_module
 info [bazel]   bazel-bin/packages/kbn-std/npm_module
 info [bazel]   bazel-bin/packages/kbn-telemetry-tools/npm_module
 info [bazel]   bazel-bin/packages/kbn-tinymath/npm_module
 info [bazel]   bazel-bin/packages/kbn-utility-types/npm_module
 info [bazel]   bazel-bin/packages/kbn-utils/npm_module
 info [bazel] INFO: Elapsed time: 5.107s, Critical Path: 0.63s
 info [bazel] INFO: 1 process: 1 internal.
 info [bazel]
 succ yarn.lock analysis completed without any issues
 succ 16 bootstrap builds are cached
 info [kibana] running [kbn:bootstrap] script
ERROR [bootstrap] failed:
ERROR Error: Command failed with exit code 1: /home/ubuntu/.nvm/versions/node/v14.16.1/lib/node_modules/yarn/bin/yarn.js run kbn:bootstrap

      /home/ubuntu/kibana/node_modules/node-gyp-build/index.js:59
        throw new Error('No native build was found for ' + target + '\n    loaded from: ' + dir + '\n')
              ^
      Error: No native build was found for platform=linux arch=x64 runtime=node abi=83 uv=1 libc=glibc node=14.16.1
          loaded from: /home/ubuntu/kibana/node_modules/lmdb-store

          at Function.load.path (/home/ubuntu/kibana/node_modules/node-gyp-build/index.js:59:9)
          at load (/home/ubuntu/kibana/node_modules/node-gyp-build/index.js:21:30)
          at Object.<anonymous> (/home/ubuntu/kibana/node_modules/lmdb-store/index.js:7:49)
          at Module._compile (internal/modules/cjs/loader.js:1063:30)
          at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
          at Module.load (internal/modules/cjs/loader.js:928:32)
          at Function.Module._load (internal/modules/cjs/loader.js:769:14)
          at Module.require (internal/modules/cjs/loader.js:952:19)
          at Module.Hook._require.Module.require (/home/ubuntu/kibana/node_modules/require-in-the-middle/index.js:80:39)
          at Module.Hook._require.Module.require (/home/ubuntu/kibana/node_modules/require-in-the-middle/index.js:80:39)
      error Command failed with exit code 1.
      $ node scripts/build_ts_refs --ignore-type-failures
      info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
          at makeError (/home/ubuntu/kibana/packages/kbn-pm/dist/index.js:35193:11)
          at handlePromise (/home/ubuntu/kibana/packages/kbn-pm/dist/index.js:34104:26)
          at processTicksAndRejections (internal/process/task_queues.js:93:5)
          at async /home/ubuntu/kibana/packages/kbn-pm/dist/index.js:9013:9
          at async scheduleItem (/home/ubuntu/kibana/packages/kbn-pm/dist/index.js:22723:9)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I was wondering if any have seen this issue before and how to fix it?

Mike

I switch to 7.13 branch and the setup steps worked fine.

Still some warnings thou,

$ node scripts/kbn bootstrap
 succ [bazel_tools] all bazel tools are correctly installed
 info [bazel] Starting local Bazel server and connecting to it...
 info [bazel] INFO: Invocation ID: c70d9740-f7b7-4061-b028-841f6f10077f
 info [bazel] $ node ./preinstall_check
 info [bazel] [1/5] Validating package.json...
 info [bazel] [2/5] Resolving packages...
 info [bazel] warning Resolution field "prismjs@1.23.0" is incompatible with requested version "prismjs@~1.22.0"
 info [bazel] warning Resolution field "trim@0.0.3" is incompatible with requested version "trim@0.0.1"
 info [bazel] warning Resolution field "trim@0.0.3" is incompatible with requested version "trim@0.0.1"
 info [bazel] warning Resolution field "trim@0.0.3" is incompatible with requested version "trim@0.0.1"
 info [bazel] warning Resolution field "typescript@4.1.3" is incompatible with requested version "typescript@^3.3.3333"
 info [bazel] warning Resolution field "@types/node@14.14.14" is incompatible with requested version "@types/node@^10.1.0"
 info [bazel] warning Resolution field "@types/node@14.14.14" is incompatible with requested version "@types/node@8.10.54"
 info [bazel] warning Resolution field "typescript@4.1.3" is incompatible with requested version "typescript@~3.7.2"
 info [bazel] warning Resolution field "@types/node@14.14.14" is incompatible with requested version "@types/node@12.12.50"
 info [bazel] warning Resolution field "typescript@4.1.3" is incompatible with requested version "typescript@^3.5.3"
 info [bazel] warning Resolution field "schema-utils@1.0.0" is incompatible with requested version "schema-utils@^0.3.0"
 info [bazel] warning Resolution field "trim@0.0.3" is incompatible with requested version "trim@0.0.1"
 info [bazel] warning Resolution field "trim@0.0.3" is incompatible with requested version "trim@0.0.1"
 info [bazel] [3/5] Fetching packages...
 info [bazel] warning sha.js@2.4.10: Invalid bin entry for "sha.js" (in "sha.js").
 info [bazel] warning sha.js@2.4.11: Invalid bin entry for "sha.js" (in "sha.js").
 info [bazel] info fsevents@2.1.2: The platform "linux" is incompatible with this module.
 info [bazel] info "fsevents@2.1.2" is an optional dependency and failed compatibility check. Excluding it from installation.
 info [bazel] [4/5] Linking dependencies...
 info [bazel] warning " > @elastic/apm-rum-react@1.2.5" has incorrect peer dependency "react-router-dom@^4.0.0".
 info [bazel] warning " > @elastic/charts@28.2.0" has incorrect peer dependency "moment@^2.29.1".
 info [bazel] warning " > @elastic/charts@28.2.0" has incorrect peer dependency "moment-timezone@^0.5.32".
 info [bazel] warning " > react-monaco-editor@0.41.2" has incorrect peer dependency "@types/react@^17.x".
 info [bazel] warning " > react-monaco-editor@0.41.2" has incorrect peer dependency "react@^17.x".
 info [bazel] warning " > react-shortcuts@2.0.1" has incorrect peer dependency "react@^0.14.8 || ^15".
 info [bazel] warning " > react-shortcuts@2.0.1" has incorrect peer dependency "react-dom@^0.14.8 || ^15".
 info [bazel] warning "@octokit/rest > @octokit/plugin-request-log@1.0.2" has unmet peer dependency "@octokit/core@>=3".
 info [bazel] warning "@storybook/addon-docs > @mdx-js/react@1.6.22" has incorrect peer dependency "react@^16.13.1 || ^17.0.0".
 info [bazel] warning "@testing-library/react-hooks > react-error-boundary@3.1.1" has incorrect peer dependency "react@>=16.13.1".
 info [bazel] [5/5] Building fresh packages...

Mike

It's fine with the warnings, as long as it finishes successfully. Some packages are only there as devDependencies, some only apply to specific OSs so some warnings will always be there.
I do recommend using 7.x or 7.13 for your development, master is usually less stable.

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