# Kibana script "plugin\_helpers" returns 0 even when failure is encountered

**URL:** <https://discuss.elastic.co/t/kibana-script-plugin-helpers-returns-0-even-when-failure-is-encountered/364701>\
**Category:** Kibana\
**Tags:** kibana-plugin-development\
**Created:** [August 9, 2024, 4:11pm UTC](https://discuss.elastic.co/t/kibana-script-plugin-helpers-returns-0-even-when-failure-is-encountered/364701 "2024-08-09T16:11:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kbujold\_wr](https://avatars.discourse-cdn.com/v4/letter/k/9fc29f/32.png) [@kbujold\_wr](https://discuss.elastic.co/u/kbujold_wr)\
**Post date:** [August 9, 2024, 4:11pm UTC](https://discuss.elastic.co/t/kibana-script-plugin-helpers-returns-0-even-when-failure-is-encountered/364701/1 "2024-08-09T16:11:58Z")

</div>

The Kibana script "scripts/plugin\_helpers" returns 0 even when failure is encountered. This is not optimal has we want our build to fail if there is an error.

```auto
yarn build
yarn run v1.22.21
$ yarn plugin-helpers build --debug --verbose
$ node ../../scripts/plugin_helpers build --debug --verbose
Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
 debg KIBANA_CI_STATS_CONFIG environment variable not found, disabling CiStatsReporter
 info deleting the build and target directories
 debg creating build output dir [/localdisk/kbujold/WORKSPACE/wra-env/localdisk/designer/kbujold/wra-env/cgcs-root/wrs/analytics/git/elastic/kibana/plugins/wind/build/kibana/wind]
 info run bazel and build required artifacts for the optimizer
 succ bazel run successfully and artifacts were created
 info running @kbn/optimizer
 │ERROR Browserslist: caniuse-lite is outdated. Please run:
 │ info stopping @kbn/optimizer
 info compressing js and css bundles found at plugins/wind/build/kibana/wind/target/public to brotli
ERROR Error: ENOENT: no such file or directory, scandir '/localdisk/kbujold/WORKSPACE/wra-env/localdisk/designer/kbujold/wra-env/cgcs-root/wrs/analytics/git/elastic/kibana/plugins/wind/build/kibana/wind/target/public'
 info copying assets from `public/assets` to build
 info copying server source into the build and converting with babel
 info running yarn to install dependencies
 info compressing plugin into [wind-8.11.1.zip]
 succ plugin archive created
 debg CIStatsReporter committerHash: bce560392393d742e922
Done in 44.82s.

echo $?
0

```

---

<div class="post-metadata">

**Author:** ![kbujold\_wr](https://avatars.discourse-cdn.com/v4/letter/k/9fc29f/32.png) [@kbujold\_wr](https://discuss.elastic.co/u/kbujold_wr)\
**Post date:** [August 9, 2024, 4:42pm UTC](https://discuss.elastic.co/t/kibana-script-plugin-helpers-returns-0-even-when-failure-is-encountered/364701/2 "2024-08-09T16:42:16Z")

</div>

I think there should be a `process.exit(1);` here after the log.

> <https://github.com/elastic/kibana/blob/main/packages/kbn-plugin-helpers/src/tasks/brotli_compress_bundles.ts#L46>

---

<div class="post-metadata">

**Author:** ![cheiligers](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cheiligers/32/73114_2.png) [@cheiligers](https://discuss.elastic.co/u/cheiligers)\
**Post date:** [September 21, 2024, 8:53pm UTC](https://discuss.elastic.co/t/kibana-script-plugin-helpers-returns-0-even-when-failure-is-encountered/364701/3 "2024-09-21T20:53:32Z")

</div>

> [@kbujold\_wr](#):
>
> [kibana/packages/kbn-plugin-helpers/src/tasks/brotli\_compress\_bundles.ts at main · elastic/kibana · GitHub](https://github.com/elastic/kibana/blob/main/packages/kbn-plugin-helpers/src/tasks/brotli_compress_bundles.ts#L46)

@kbujold_wr Please open a github issue for the team to investigate. We'll need to know what version you're building against, your use-case and more.  
The PR template has prompts for info we need.

We welcome PR's from community members too!

I suggest opening an issue and possibly a PR too in order to speed the resolution up.  
Tina

---

<div class="post-metadata">

**Author:** ![kbujold\_wr](https://avatars.discourse-cdn.com/v4/letter/k/9fc29f/32.png) [@kbujold\_wr](https://discuss.elastic.co/u/kbujold_wr)\
**Post date:** [September 24, 2024, 9:08pm UTC](https://discuss.elastic.co/t/kibana-script-plugin-helpers-returns-0-even-when-failure-is-encountered/364701/4 "2024-09-24T21:08:41Z")

</div>

Will do. I am seeing this in ELK 8.11.1 and 8.15.0
