# Kibana Codebase Local Setup

**URL:** <https://discuss.elastic.co/t/kibana-codebase-local-setup/363192>\
**Category:** Kibana\
**Created:** [July 16, 2024, 4:23am UTC](https://discuss.elastic.co/t/kibana-codebase-local-setup/363192 "2024-07-16T04:23:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Priyanka\_Narne](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/priyanka_narne/32/135299_2.png) [@Priyanka\_Narne](https://discuss.elastic.co/u/Priyanka_Narne)\
**Post date:** [July 16, 2024, 4:23am UTC](https://discuss.elastic.co/t/kibana-codebase-local-setup/363192/1 "2024-07-16T04:23:07Z")

</div>

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](https://www.elastic.co/guide/en/kibana/current/development-getting-started.html)

When I run the command _yarn kbn bootstrap_, I am getting errors.

 ![Screenshot 2024-07-16 093209](https://us1.discourse-cdn.com/elastic/original/3X/c/c/ccbdfef09d7e08e6364bf15caf6f5090f3f2ffe8.png)

Please help me resolve the error, eventually setting up the codebase.

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [July 16, 2024, 9:55am UTC](https://discuss.elastic.co/t/kibana-codebase-local-setup/363192/2 "2024-07-16T09:55:15Z")

</div>

Hi @Priyanka_Narne,

Are you running off main or a tagged version? Can you also confirm:

1. You have setup the correct version of Node.js using `nvm use`?
2. 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](https://stackoverflow.com/questions/53748871/error-cannot-find-module-babel-register). Can you try either running a clean or clearing out the package.lock file and reinstalling?

---

<div class="post-metadata">

**Author:** ![Priyanka\_Narne](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/priyanka_narne/32/135299_2.png) [@Priyanka\_Narne](https://discuss.elastic.co/u/Priyanka_Narne)\
**Post date:** [July 16, 2024, 6:00pm UTC](https://discuss.elastic.co/t/kibana-codebase-local-setup/363192/3 "2024-07-16T18:00:44Z")

</div>

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.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/d/ddb4d39b17271a25bd002ce826fa14005ad9c02c.png)

```auto
[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.

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [July 18, 2024, 9:14am UTC](https://discuss.elastic.co/t/kibana-codebase-local-setup/363192/4 "2024-07-18T09:14:57Z")

</div>

Thanks for sharing. I assume you have npm and yarn installed?
