I am setting the Kibana codebase locally.
I followed the steps given in https://www.elastic.co/guide/en/kibana/current/development-getting-started.html
When I run the command yarn kbn bootstrap, I am getting errors.
Please help me resolve the error, eventually setting up the codebase.
Hi @Priyanka_Narne,
Are you running off main or a tagged version? Can you also confirm:
- You have setup the correct version of Node.js using
nvm use
?
- You haven't switched between different branches that may have be using different version of Node.js?
It might be that the package.lock file is out of sync as per this StackOverflow. Can you try either running a clean or clearing out the package.lock file and reinstalling?
Hi @carly.richmond ,
I am using main version.
I have setup the correct version of Node.js using nvm use (currently it is 20.15.1 in main version).
I have tried re-running yarn kbn bootstrap, now it is different error.
[bazel] warning Resolution field "@types/node@20.10.5" is incompatible with requested version "@types/node@^20.12.12"
[bazel] success Already up-to-date.
[bazel] INFO: Repository npm instantiated at:
[bazel] /mnt/e/Snoops/kibana/kibana/WORKSPACE.bazel:47:13: in <toplevel>
[bazel] /home/priyanka/.cache/bazel/_bazel_priyanka/0d37a2b3ec4f88dc5c8ded7c7b0d5c15/external/build_bazel_rules_nodejs/index.bzl:83:18: in yarn_install
[bazel] Repository rule yarn_install defined at:
[bazel] /home/priyanka/.cache/bazel/_bazel_priyanka/0d37a2b3ec4f88dc5c8ded7c7b0d5c15/external/build_bazel_rules_nodejs/internal/npm_install/npm_install.bzl:956:31: in <toplevel>
[bazel] ERROR: An error occurred during the fetch of repository 'npm':
[bazel] Traceback (most recent call last):
[bazel] File "/home/priyanka/.cache/bazel/_bazel_priyanka/0d37a2b3ec4f88dc5c8ded7c7b0d5c15/external/build_bazel_rules_nodejs/internal/npm_install/npm_install.bzl", line 954, column 24, in _yarn_install_impl
[bazel] _create_build_files(repository_ctx, "yarn_install", node, repository_ctx.attr.yarn_lock, repository_ctx.attr.generate_local_modules_build_files)
[bazel] File "/home/priyanka/.cache/bazel/_bazel_priyanka/0d37a2b3ec4f88dc5c8ded7c7b0d5c15/external/build_bazel_rules_nodejs/internal/npm_install/npm_install.bzl", line 492, column 13, in _create_build_files
[bazel] fail("generate_build_file.ts failed: \nSTDOUT:\n%s\nSTDERR:\n%s" % (result.stdout, result.stderr))
[bazel] Error in fail: generate_build_file.ts failed:
[bazel] STDOUT:
[bazel]
[bazel] STDERR:
[bazel] Timed out
[bazel] ERROR: /mnt/e/Snoops/kibana/kibana/WORKSPACE.bazel:47:13: fetching yarn_install rule //external:npm: Traceback (most recent c recent call last):
[bazel] File "/home/priyanka/.cache/bazel/_bazel_priyanka/0d37a2b3ec4f88dc5c8ded7c7b0d5c15/external/build_bazel_rules_nodejs/internal/npm_install/npm_install.bzl", line 954, column 24, in _yarn_install_impl
[bazel] _create_build_files(repository_ctx, "yarn_install", node, repository_ctx.attr.yarn_lock, repository_ctx.attr.generate_local_modules_build_files)
[bazel] File "/home/priyanka/.cache/bazel/_bazel_priyanka/0d37a2b3ec4f88dc5c8ded7c7b0d5c15/external/build_bazel_rules_nodejs/internal/npm_install/npm_install.bzl", line 492, column 13, in _create_build_files
[bazel] fail("generate_build_file.ts failed: \nSTDOUT:\n%s\nSTDERR:\n%s" % (result.stdout, result.stderr))
[bazel] Error in fail: generate_build_file.ts failed:
[bazel] STDOUT:
[bazel]
[bazel] STDERR:
[bazel] Timed out
[bazel] ERROR: Skipping '//packages/kbn-ui-shared-deps-src:shared_built_assets': no such package '@npm//webpack-cli': generate_build_file.ts failed:
[bazel] STDOUT:
[bazel]
[bazel] STDERR:
[bazel] Timed out
[bazel] ERROR: no such package '@npm//webpack-cli': generate_build_file.ts failed:
[bazel] STDOUT:
[bazel]
[bazel] STDERR:
[bazel] Timed out
[bazel] INFO: Elapsed time: 3265.843s
[bazel] INFO: 0 processes.
[bazel]
HINT
HINT If experiencing problems with node_modules try `yarn kbn bootstrap --force-install` or as last resort `yarn kbn reset && yarn kbn bootstrap`
HINT
ERROR [bootstrap] failed: [bazel] exited with code [1]
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command
Please let me know what can I do to solve this. Kindly help me.
Thanks for sharing. I assume you have npm and yarn installed?