ELK 8.9.0 Caniuse Error during yarn build cause missing plugin build folder

I am seeing this error below during yarn build of our plugin. We had no build errors a few weeks ago.

We do not get a build anymore, we should see this output in the logs below from yarn build, but we do not anymore.

succ browser bundle created at plugins/wind/build/kibana/wind/target/public
$ yarn plugin-helpers build --debug --verbose --kibana-version 8.9.0
$ node ../../scripts/plugin_helpers build --debug --verbose --kibana-version 8.9.0
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 [/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 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.9.0.zip]
 succ plugin archive created
 debg CIStatsReporter committerHash: ee1de24dab4612b0eecf
Done in 98.21s.
Removing intermediate container 44d6540975c2
 ---> a0e8f9137f7c

One the left a successful build and right the failed one

Hi @kbujold_wr,

Have you tried running npx update-browserlist-db@latest as suggested in the error to fix the failure?

This is what I had to do to fix the issue. It had to be done in kibana and not the plugin

diff --git a/package.json b/package.json
index 913055ee5fb..4e49b3da8a3 100644
--- a/package.json
+++ b/package.json
@@ -84,6 +84,7 @@
     "**/isomorphic-fetch/node-fetch": "^2.6.7",
     "**/remark-parse/trim": "1.0.1",
     "**/typescript": "4.6.3",
+    "caniuse-lite": "^1.0.30001565",
     "globby/fast-glob": "^3.2.11"
   },
   "dependencies": {
diff --git a/yarn.lock b/yarn.lock
index 6b126bff77a..1551a321e53 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -11938,10 +11938,10 @@ caniuse-api@^3.0.0:
     lodash.memoize "^4.1.2"
     lodash.uniq "^4.5.0"

-caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001335, caniuse-lite@^1.0.30001400:
-  version "1.0.30001492"
-  resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001492.tgz#4a06861788a52b4c81fd3344573b68cc87fe062b"
-  integrity sha512-2efF8SAZwgAX1FJr87KWhvuJxnGJKOnctQa8xLOskAXNXq8oiuqgl6u1kk3fFpsp3GgvzlRjiK1sl63hNtFADw==
+caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001335, caniuse-lite@^1.0.30001400, caniuse-lite@^1.0.30001565:
+  version "1.0.30001565"
+  resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001565.tgz"
+  integrity sha512-xrE//a3O7TP0vaJ8ikzkD2c2NgcVUvsEe2IvFTntV4Yd1Z9FVzh+gW+enX96L0psrbaFMcVcH2l90xNuGDWc8w==

 canvg@^3.0.9:
   version "3.0.9"

Which branch of Kibana have you pulled from? I see a similar commit in the repo made back in October that was merged:

Kibana 8.9.0

So looking at the PR mentioend above I see it's tagged with the 8.11 release tag. Can you try pulling that branch and see if that resolves your issue?

We cannot up version right now

Hi @kbujold_wr,

If you're not able to update right not then you have a couple of options:

  1. Continue with the locally changed version that you have until you are ready to upgrade, at which point you'll be able to pull the fix with that version.
  2. Consider raising a PR contributing the fix as a backport for the version you are using.

Hope that helps!

We build our own kibana image which contains our external plugin so the problem is revolved for us. Others may hit this issue also though.

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