# Unable to get local issuer certificate error while building kibana - yarn build

**URL:** <https://discuss.elastic.co/t/unable-to-get-local-issuer-certificate-error-while-building-kibana-yarn-build/298139>\
**Category:** Kibana\
**Created:** [February 24, 2022, 9:34am UTC](https://discuss.elastic.co/t/unable-to-get-local-issuer-certificate-error-while-building-kibana-yarn-build/298139 "2022-02-24T09:34:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shreeya\_Rajguru](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shreeya_rajguru/32/98781_2.png) [@Shreeya\_Rajguru](https://discuss.elastic.co/u/Shreeya_Rajguru)\
**Post date:** [February 24, 2022, 9:34am UTC](https://discuss.elastic.co/t/unable-to-get-local-issuer-certificate-error-while-building-kibana-yarn-build/298139/1 "2022-02-24T09:34:19Z")

</div>

I am facing the unable to get local issuer certificate error when I try to build kibana using the command - yarn build --skip-os-packages

I have tried these solutions before which didn't work :

1. disabling TLS connection using set NODE\_TLS\_REJECT\_UNAUTHORIZED=0 but then the build throws a warning and terminates the process.
2. yarn config set strict-ssl false

Below is the complete error :

```auto
yarn build --skip-os-packages
yarn run v1.22.17
$ node scripts/build --all-platforms --skip-os-packages
 info [global] Verifying environment meets requirements
   │ succ Node.js version verified
   │ succ ✓ 0 sec

 info [global] Cleaning artifacts from previous builds
   │ debg Deleted 0 files/directories
   │ succ ✓ 0 sec

 info [global] Downloading node.js builds for all platforms
   │ debg Downloading shasum values for node version 14.17.2 from https://us-central1-elastic-kibana-184716.cloudfunctions.net/kibana-ci-proxy-cache/dist/v14.17.2/SHASUMS256.txt
   │ERROR failure 1 sec
   │ERROR Error: unable to get local issuer certificate
   │ at TLSSocket.onConnectSecure (_tls_wrap.js:1514:34)
   │ at TLSSocket.emit (events.js:375:28)
   │ at TLSSocket._finishInit (_tls_wrap.js:936:8)
   │ at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:708:12)

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

```

---

<div class="post-metadata">

**Author:** ![tiagocosta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tiagocosta/32/40045_2.png) [@tiagocosta](https://discuss.elastic.co/u/tiagocosta)\
**Post date:** [February 28, 2022, 5:22pm UTC](https://discuss.elastic.co/t/unable-to-get-local-issuer-certificate-error-while-building-kibana-yarn-build/298139/2 "2022-02-28T17:22:41Z")

</div>

@Shreeya_Rajguru a couple questions here so we can understand a little better your environment.

1 - which version of Kibana are you trying to build?  
2 - which OS are you running?  
3 - could you please run the yarn version we currently support which is `1.21.1`?  
4 - how have you previously tried to disable `NODE_TLS_REJECT_UNAUTHORIZED`?

Cheers

---

<div class="post-metadata">

**Author:** ![Shreeya\_Rajguru](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shreeya_rajguru/32/98781_2.png) [@Shreeya\_Rajguru](https://discuss.elastic.co/u/Shreeya_Rajguru)\
**Post date:** [March 1, 2022, 10:59am UTC](https://discuss.elastic.co/t/unable-to-get-local-issuer-certificate-error-while-building-kibana-yarn-build/298139/3 "2022-03-01T10:59:14Z")

</div>

Hi @tiagocosta

1 - I am using kibana v7.13.4  
2 - OS is windows 10  
3 - I tried yarn build with yarn v1.21.1 as per your suggestion, but it gives the same error  
4 - I ran the command set NODE\_TLS\_REJECT\_UNAUTHORIZED = 0 on the terminal to disable it

My main problem statement is to create a docker image of kibana v7.13.4 which contains the changes I have done in an existing visualisation plugin's code. I referred the documentation page for Building Kibana Distributable and tried yarn build which gives me this issue.

Let me know if there is any other way to create the docker image of kibana repo/an existing plugin directory so as to deploy it.

Thanks,  
Shreeya

---

<div class="post-metadata">

**Author:** ![tiagocosta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tiagocosta/32/40045_2.png) [@tiagocosta](https://discuss.elastic.co/u/tiagocosta)\
**Post date:** [March 3, 2022, 4:06pm UTC](https://discuss.elastic.co/t/unable-to-get-local-issuer-certificate-error-while-building-kibana-yarn-build/298139/4 "2022-03-03T16:06:13Z")

</div>

@Shreeya_Rajguru are you using the git bash to run the compilation? In case you are, which version?

Cheers

---

<div class="post-metadata">

**Author:** ![Shreeya\_Rajguru](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shreeya_rajguru/32/98781_2.png) [@Shreeya\_Rajguru](https://discuss.elastic.co/u/Shreeya_Rajguru)\
**Post date:** [March 4, 2022, 5:34am UTC](https://discuss.elastic.co/t/unable-to-get-local-issuer-certificate-error-while-building-kibana-yarn-build/298139/5 "2022-03-04T05:34:14Z")

</div>

Yes @tiagocosta, I am using git bash 2.33.0.windows.2

---

<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:** [April 1, 2022, 5:34am UTC](https://discuss.elastic.co/t/unable-to-get-local-issuer-certificate-error-while-building-kibana-yarn-build/298139/6 "2022-04-01T05:34:22Z")

</div>

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