kibana icon indicating copy to clipboard operation
kibana copied to clipboard

yarn kbn bootstrap fails to run without network

Open wwh1997 opened this issue 3 years ago • 0 comments

Kibana version: 7.16 Elasticsearch version: 7.16 Server OS version: win10

Original install method (e.g. download page, yum, from source, etc.): Download and unpacked zip Describe the bug: I am trying to setup kibana 7.16 development environment and to bootstrap Kibana and install all the dependencies. Sadly, I've this message failed [bootstrap] failed I can't get the code from git using the git clone command because of the network and my new development PC doesn’t have an internet connection. Is there any solution to make the command yarn kbn bootstrap or yarn kbn bootstrap -offline work successfully? Steps to reproduce: 1.download kibana 7.16zip and unpacked zip 2.cd c:\kiban 3.yarn kbn bootstrap 4. I tried running the command yarn kbn bootstrap --offline but still got the same error Provide logs and/or server output (if relevant):

$ yarn kbn bootstrap
yarn run v1.22.19
$ node scripts/kbn bootstrap
 succ [bazel_tools] all bazel tools are correctly installed
 info [bazel] INFO: Invocation ID: 0407a57b-dc4a-43b0-9e7f-f19f3a11741e
 info [bazel] INFO: Analyzed target //packages:build (1 packages loaded, 377 targets configured).
 info [bazel] INFO: Found 1 target...
 info [bazel] Target //packages:build up-to-date:
 info [bazel]   bazel-bin/packages/elastic-apm-synthtrace/npm_module
 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-alerts/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-cli-dev-mode/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-docs-utils/npm_module
 info [bazel]   bazel-bin/packages/kbn-es/npm_module
 info [bazel]   bazel-bin/packages/kbn-es-archiver/npm_module
 info [bazel]   bazel-bin/packages/kbn-es-query/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-field-types/npm_module
 info [bazel]   bazel-bin/packages/kbn-i18n/npm_module
 info [bazel]   bazel-bin/packages/kbn-interpreter/npm_module
 info [bazel]   bazel-bin/packages/kbn-io-ts-utils/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-mapbox-gl/npm_module
 info [bazel]   bazel-bin/packages/kbn-monaco/npm_module
 info [bazel]   bazel-bin/packages/kbn-optimizer/npm_module
 info [bazel]   bazel-bin/packages/kbn-plugin-generator/npm_module
 info [bazel]   bazel-bin/packages/kbn-plugin-helpers/npm_module
 info [bazel]   bazel-bin/packages/kbn-rule-data-utils/npm_module
 info [bazel]   bazel-bin/packages/kbn-securitysolution-autocomplete/npm_module
 info [bazel]   bazel-bin/packages/kbn-securitysolution-list-constants/npm_module
 info [bazel]   bazel-bin/packages/kbn-securitysolution-io-ts-types/npm_module
 info [bazel]   bazel-bin/packages/kbn-securitysolution-io-ts-alerting-types/npm_module
 info [bazel]   bazel-bin/packages/kbn-securitysolution-io-ts-list-types/npm_module
 info [bazel]   bazel-bin/packages/kbn-securitysolution-io-ts-utils/npm_module
 info [bazel]   bazel-bin/packages/kbn-securitysolution-list-api/npm_module
 info [bazel]   bazel-bin/packages/kbn-securitysolution-list-hooks/npm_module
 info [bazel]   bazel-bin/packages/kbn-securitysolution-list-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-securitysolution-t-grid/npm_module
 info [bazel]   bazel-bin/packages/kbn-securitysolution-hook-utils/npm_module
 info [bazel]   bazel-bin/packages/kbn-server-http-tools/npm_module
 info [bazel]   bazel-bin/packages/kbn-server-route-repository/npm_module
 info [bazel]   bazel-bin/packages/kbn-spec-to-console/npm_module
 info [bazel]   bazel-bin/packages/kbn-std/npm_module
 info [bazel]   bazel-bin/packages/kbn-storybook/npm_module
 info [bazel]   bazel-bin/packages/kbn-telemetry-tools/npm_module
 info [bazel]   bazel-bin/packages/kbn-test/npm_module
 info [bazel]   bazel-bin/packages/kbn-test-subj-selector/npm_module
 info [bazel]   bazel-bin/packages/kbn-timelion-grammar/npm_module
 info [bazel]   bazel-bin/packages/kbn-tinymath/npm_module
 info [bazel]   bazel-bin/packages/kbn-typed-react-router-config/npm_module
 info [bazel]   bazel-bin/packages/kbn-ui-framework/npm_module
 info [bazel]   bazel-bin/packages/kbn-ui-shared-deps-npm/npm_module
 info [bazel]   bazel-bin/packages/kbn-ui-shared-deps-src/npm_module
 info [bazel]   bazel-bin/packages/kbn-utility-types/npm_module
 info [bazel]   bazel-bin/packages/kbn-utils/npm_module
 info [bazel]   bazel-bin/packages/elastic-datemath/npm_module_types
 info [bazel] INFO: Elapsed time: 6.721s, Critical Path: 1.34s
 info [bazel] INFO: 1 process: 1 internal.
 info [bazel]
 succ yarn.lock analysis completed without any issues
[vscode] Browserslist: caniuse-lite is outdated. Please run:\n  npx browserslist@latest --update-db\n  Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
[vscode]  succ updated C:\kibana\.vscode\settings.json
[ts refs] Browserslist: caniuse-lite is outdated. Please run:\n  npx browserslist@latest --update-db\n  Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
[ts refs]  info ensuring we have the latest changelog from upstream 7.16


[ts refs] ERROR UNHANDLED ERROR
[ts refs] ERROR Error: Command failed with exit code 128: git fetch https://github.com/elastic/kibana.git 7.16
[ts refs]       error: 22261 bytes of body are still expected
[ts refs]       fetch-pack: unexpected disconnect while reading sideband packet
[ts refs]       fatal: early EOF
[ts refs]       fatal: fetch-pack: invalid index-pack output
[ts refs]           at makeError (C:\kibana\node_modules\execa\lib\error.js:59:11)
[ts refs]           at handlePromise (C:\kibana\node_modules\execa\index.js:114:26)
[ts refs]           at processTicksAndRejections (node:internal/process/task_queues:96:5)
[ts refs]           at RepoInfo.git (C:\kibana\src\dev\typescript\ref_output_cache\/repo_info.ts:49:18)
[ts refs]           at RepoInfo.getMergeBase (C:\kibana\src\dev\typescript\ref_output_cache\/repo_info.ts:30:5)
[ts refs]           at Function.create (C:\kibana\src\dev\typescript\ref_output_cache\/ref_output_cache.ts:61:23)
[ts refs]           at description (C:\kibana\src\dev\typescript\/build_ts_refs_cli.ts:86:23)
[ts refs]           at C:\kibana\node_modules\@kbn\dev-utils\target_node\run\run.js:62:7
[ts refs]           at withProcRunner (C:\kibana\node_modules\@kbn\dev-utils\target_node\proc_runner\with_proc_runner.js:31:5)
[ts refs]           at run (C:\kibana\node_modules\@kbn\dev-utils\target_node\run\run.js:61:5)
ERROR [bootstrap] failed:
ERROR Error: Command failed with exit code 1: C:\Program Files\nodejs\node.exe scripts/build_ts_refs --ignore-type-failures
      Browserslist: caniuse-lite is outdated. Please run:
        npx browserslist@latest --update-db
        Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
       info ensuring we have the latest changelog from upstream 7.16
      ERROR UNHANDLED ERROR
      ERROR Error: Command failed with exit code 128: git fetch https://github.com/elastic/kibana.git 7.16
            error: 22261 bytes of body are still expected
            fetch-pack: unexpected disconnect while reading sideband packet
            fatal: early EOF
            fatal: fetch-pack: invalid index-pack output
                at makeError (C:\kibana\node_modules\execa\lib\error.js:59:11)
                at handlePromise (C:\kibana\node_modules\execa\index.js:114:26)
                at processTicksAndRejections (node:internal/process/task_queues:96:5)
                at RepoInfo.git (C:\kibana\src\dev\typescript\ref_output_cache\/repo_info.ts:49:18)
                at RepoInfo.getMergeBase (C:\kibana\src\dev\typescript\ref_output_cache\/repo_info.ts:30:5)
                at Function.create (C:\kibana\src\dev\typescript\ref_output_cache\/ref_output_cache.ts:61:23)
                at description (C:\kibana\src\dev\typescript\/build_ts_refs_cli.ts:86:23)
                at C:\kibana\node_modules\@kbn\dev-utils\target_node\run\run.js:62:7
                at withProcRunner (C:\kibana\node_modules\@kbn\dev-utils\target_node\proc_runner\with_proc_runner.js:31:5)
                at run (C:\kibana\node_modules\@kbn\dev-utils\target_node\run\run.js:61:5)
          at makeError (C:\kibana\packages\kbn-pm\dist\index.js:10548:11)
          at handlePromise (C:\kibana\packages\kbn-pm\dist\index.js:9459:26)
          at processTicksAndRejections (node:internal/process/task_queues:96:5)
          at async Object.run (C:\kibana\packages\kbn-pm\dist\index.js:8986:5)
          at async runCommand (C:\kibana\packages\kbn-pm\dist\index.js:61554:5)
          at async Module.run (C:\kibana\packages\kbn-pm\dist\index.js:242:3)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.



wwh1997 avatar Aug 10 '22 03:08 wwh1997

Pinging @elastic/kibana-operations (Team:Operations)

elasticmachine avatar Aug 12 '22 21:08 elasticmachine

Could you please try to setup the following environment variable before running bootstrap BUILD_TS_REFS_DISABLE=true ?

After this please try to run yarn kbn bootstrap --offline

mistic avatar Aug 14 '22 14:08 mistic

hello mistic,thx for your help. I built a gitlab server on the intranet and modified the git address in the file 'build_ts_refs_cli.ts' to my intranet address to solve this problem. After seeing your suggestion, I tried it again with your suggestion. Your suggestion really worked, thanks a lot.

wwh1997 avatar Aug 17 '22 14:08 wwh1997