# Yarn kbn bootstrap

**URL:** <https://discuss.elastic.co/t/yarn-kbn-bootstrap/275603>\
**Category:** Kibana\
**Created:** [June 10, 2021, 4:54pm UTC](https://discuss.elastic.co/t/yarn-kbn-bootstrap/275603 "2021-06-10T16:54:34Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Akhil2](https://avatars.discourse-cdn.com/v4/letter/a/8797f3/32.png) [@Akhil2](https://discuss.elastic.co/u/Akhil2)\
**Post date:** [June 10, 2021, 4:54pm UTC](https://discuss.elastic.co/t/yarn-kbn-bootstrap/275603/1 "2021-06-10T16:54:34Z")

</div>

Hello there,

I am trying to build Kibana from the source and following this link.

> **[Getting started | Kibana Guide \[7.13\] | Elastic](https://www.elastic.co/guide/en/kibana/current/development-getting-started.html)**

but when I run yarn kbn bootstrap. I received the following error.

```auto
D:\Kibana-development\kibana>yarn kbn bootstrap
yarn run v1.22.1
$ node scripts/kbn bootstrap
 info [kibana] running yarn

$ node ./preinstall_check
[1/5] Validating package.json...
[2/5] Resolving packages...
warning Resolution field "schema-utils@1.0.0" is incompatible with requested version "schema-utils@^0.3.0"
warning Resolution field "typescript@4.0.2" is incompatible with requested version "typescript@~3.7.2"
warning Resolution field "typescript@4.0.2" is incompatible with requested version "typescript@^3.3.3333"
warning Resolution field "typescript@4.0.2" is incompatible with requested version "typescript@^3.2.2"
warning Resolution field "typescript@4.0.2" is incompatible with requested version "typescript@^3.0.3"
warning Resolution field "typescript@4.0.2" is incompatible with requested version "typescript@^3.4.5"
[3/5] Fetching packages...
warning Pattern ["babel-plugin-require-context-hook@npm:babel-plugin-require-context-hook-babel7@1.0.0"] is trying to unpack in the same destination "C:\\Users\\Jigar Patel\\AppData\\Local\\Yarn\\Cache\\v6\\npm-babel-plugin-require-context-hook-1.0.0-1273d4cee7e343d0860966653759a45d727e815d-integrity\\node_modules\\babel-plugin-require-context-hook" as pattern ["babel-plugin-require-context-hook@^1.0.0"]. This could result in non-deterministic behavior, skipping.
info fsevents@1.2.12: The platform "win32" is incompatible with this module.
info "fsevents@1.2.12" is an optional dependency and failed compatibility check. Excluding it from installation.
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/eui@29.5.0" has incorrect peer dependency "typescript@^3.7.2".
warning "@kbn/ace > raw-loader@3.1.0" has unmet peer dependency "webpack@^4.3.0".
warning " > @storybook/addon-essentials@6.0.26" has unmet peer dependency "babel-loader@^8.0.0".
warning " > @storybook/addon-essentials@6.0.26" has unmet peer dependency "react-is@^16.8.0".
warning "@storybook/addon-essentials > @storybook/addon-docs@6.0.26" has unmet peer dependency "babel-loader@^8.0.0".
warning "@storybook/addon-essentials > @storybook/addon-docs@6.0.26" has unmet peer dependency "react-is@^16.8.0".
warning "@storybook/addon-essentials > @storybook/addon-docs > @mdx-js/react@1.6.16" has incorrect peer dependency "react@^16.13.1".
warning " > @testing-library/react-hooks@3.4.1" has unmet peer dependency "react-test-renderer@>=16.9.0".
warning "workspace-aggregator-177f56ef-c3fe-4270-a326-07035ee96f0b > x-pack > @cypress/webpack-preprocessor@5.4.6" has unmet peer dependency "@babel/preset-env@^7.0.0".
warning "workspace-aggregator-177f56ef-c3fe-4270-a326-07035ee96f0b > x-pack > @elastic/apm-rum-react@1.2.5" has incorrect peer dependency "react-router-dom@^4.0.0".
warning "workspace-aggregator-177f56ef-c3fe-4270-a326-07035ee96f0b > x-pack > react-shortcuts@2.0.1" has incorrect peer dependency "react@^0.14.8 || ^15".
warning "workspace-aggregator-177f56ef-c3fe-4270-a326-07035ee96f0b > x-pack > 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 [@kbn/config-schema] running [kbn:bootstrap] script
 info [@kbn/utility-types] running [kbn:bootstrap] script
 succ [@kbn/utility-types] bootstrap complete
 succ [@kbn/config-schema] bootstrap complete
 info [@kbn/std] running [kbn:bootstrap] script
 info [@kbn/utils] running [kbn:bootstrap] script
 succ [@kbn/std] bootstrap complete
 succ [@kbn/utils] bootstrap complete
 info [@kbn/apm-config-loader] running [kbn:bootstrap] script
 info [@kbn/dev-utils] running [kbn:bootstrap] script
 info [@kbn/logging] running [kbn:bootstrap] script
 succ [@kbn/logging] bootstrap complete
 succ [@kbn/apm-config-loader] bootstrap complete
 succ [@kbn/dev-utils] bootstrap complete
 info [@kbn/ace] running [kbn:bootstrap] script
 info [@kbn/analytics] running [kbn:bootstrap] script
 info [@kbn/config] running [kbn:bootstrap] script
 info [@kbn/es-archiver] running [kbn:bootstrap] script
ERROR [bootstrap] failed:
ERROR Error: Command failed with exit code 1: C:\Users\Jigar Patel\AppData\Roaming\npm\node_modules\yarn\bin\yarn.js run kbn:bootstrap
      'rm' is not recognized as an internal or external command,
      operable program or batch file.
      error Command failed with exit code 1.
      $ rm -rf target && tsc
      info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
          at makeError (D:\Kibana-development\kibana\packages\kbn-pm\dist\index.js:25071:11)
          at handlePromise (D:\Kibana-development\kibana\packages\kbn-pm\dist\index.js:24006:26)
          at process._tickCallback (internal/process/next_tick.js:68:7)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

```

now I am not able to start elasticsearch as well.

```auto

D:\Kibana-development\kibana>yarn es snapshot
yarn run v1.22.1
$ node scripts/es snapshot
Error: Cannot find module '@kbn/es'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Module.Hook._require.Module.require (D:\Kibana-development\kibana\node_modules\require-in-the-middle\index.js:61:29)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.<anonymous> (D:\Kibana-development\kibana\scripts\es.js:24:13)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

```

I am using the following versions.

Node js - v10.22.1  
Yarn - 1.22.1

I have tried to search a lot but i am not sure how to solve this. can anyone please help?

Thank you in advance!

---

<div class="post-metadata">

**Author:** ![devon.thomson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/devon.thomson/32/85468_2.png) [@devon.thomson](https://discuss.elastic.co/u/devon.thomson)\
**Post date:** [June 10, 2021, 5:05pm UTC](https://discuss.elastic.co/t/yarn-kbn-bootstrap/275603/2 "2021-06-10T17:05:20Z")

</div>

> [@Akhil2](#):
>
> `'rm' is not recognized as an internal or external command`

It looks like you're running this on Windows, and this may be a windows-specific problem. I have reached out to the operations team for comment. Ideally kbn bootstrap would work correctly on both platforms.

---

<div class="post-metadata">

**Author:** ![Akhil2](https://avatars.discourse-cdn.com/v4/letter/a/8797f3/32.png) [@Akhil2](https://discuss.elastic.co/u/Akhil2)\
**Post date:** [June 10, 2021, 5:19pm UTC](https://discuss.elastic.co/t/yarn-kbn-bootstrap/275603/3 "2021-06-10T17:19:35Z")

</div>

Hi Devon,

Thanks for your input on this!

but yarn kbn bootstrap failed so I need to run this again until it is successful, right?

regarding elasticsearch problem, I can see es downloaded under @kbn under node modules folder.

 ![Capture](https://us1.discourse-cdn.com/elastic/original/3X/1/6/1638def5c0fe80d67190ee69e3fa560ae571bc3b.png)

Please let me know.

Thanks,  
Akhil

---

<div class="post-metadata">

**Author:** ![devon.thomson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/devon.thomson/32/85468_2.png) [@devon.thomson](https://discuss.elastic.co/u/devon.thomson)\
**Post date:** [June 10, 2021, 5:25pm UTC](https://discuss.elastic.co/t/yarn-kbn-bootstrap/275603/4 "2021-06-10T17:25:11Z")

</div>

You do need to run bootstrap until it is successful yes.

The ops team is suggesting that you use an emulator to run bootstrap. This should fix both of your issues. Please look through [Getting started | Kibana Guide [7.13] | Elastic](https://www.elastic.co/guide/en/kibana/current/development-getting-started.html#developing-on-windows) for directions.

let me know if it works!

---

<div class="post-metadata">

**Author:** ![Akhil2](https://avatars.discourse-cdn.com/v4/letter/a/8797f3/32.png) [@Akhil2](https://discuss.elastic.co/u/Akhil2)\
**Post date:** [June 10, 2021, 5:29pm UTC](https://discuss.elastic.co/t/yarn-kbn-bootstrap/275603/5 "2021-06-10T17:29:45Z")

</div>

Hi Devon,

my apologies, I did not get that. how do I use emulator to run bootstrap? I went through the document and there is no mention of emulator in it. sorry to bother you.

Thanks,

---

<div class="post-metadata">

**Author:** ![devon.thomson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/devon.thomson/32/85468_2.png) [@devon.thomson](https://discuss.elastic.co/u/devon.thomson)\
**Post date:** [June 10, 2021, 5:47pm UTC](https://discuss.elastic.co/t/yarn-kbn-bootstrap/275603/6 "2021-06-10T17:47:04Z")

</div>

No worries at all! The article mentions:

`Git bash (other bash emulators like Cmder could work but we did not test them)`

When I've developed on windows, I've used [Git bash](https://www.stanleyulili.com/git/how-to-install-git-bash-on-windows/), and it works really well

---

<div class="post-metadata">

**Author:** ![Akhil2](https://avatars.discourse-cdn.com/v4/letter/a/8797f3/32.png) [@Akhil2](https://discuss.elastic.co/u/Akhil2)\
**Post date:** [June 10, 2021, 5:57pm UTC](https://discuss.elastic.co/t/yarn-kbn-bootstrap/275603/7 "2021-06-10T17:57:09Z")

</div>

Okay. thanks Devon. let me try with git bash and see what happens.

Thanks again for your help!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 8, 2021, 5:57pm UTC](https://discuss.elastic.co/t/yarn-kbn-bootstrap/275603/8 "2021-07-08T17:57:37Z")

</div>

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