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

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 :

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.

@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?


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.


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


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

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