Required node version in packages.json from release tar.gz so old I cannot build kibana for Archlinux users anymore. #193648
Labels
bug
Fixes for quality problems that affect the customer experience
needs-team
Issues missing a team label
Kibana version:
kibana-8.15.1
Elasticsearch version:
NA
Server OS version:
Archlinux, kernel 6.6.51-1-lts
Browser version:
NA
Browser OS version:
NA
Original install method (e.g. download page, yum, from source, etc.):
Download from the releases bar on the right of this repository
Describe the bug:
No sane way to build and package Kibana on Archlinux. I currently maintain the Arch User Repository package for Kibana which takes the tar.gz release from this repository and in a set of instructions, extracts it and bundles it and some service files into an installable package. The package manager can then install this and you can start the kibana service. Very clean ,very easy.
The past quarter year this has stopped working. (See #188498) When starting the kibana service it immediately throws
Error: Cannot find module 'require-in-the-middle'
which tells me some node module is no longer included in the tar.gz or something else has gone horribly out of check (Perhaps this module was part of a node package on this distro which has been replaced with a newer one. Or something)I've been trying to have this package simply get the node modules itself but trying to do this has been nothing but headache. The extracted tarball wants to use Node
20.15.1
according topackage.json
and this is a rolling release distro so the packagednodejs
is a current version:22.9.0
. There is the option of thenodejs-lts-iron
package in theextra
repository (extra/nodejs-lts-iron
) which is version20.17.0
which still doesn't match but this is the closest official package I can use compared with the version desired inpackage.json
.Trying
yarn kbn bootstrap
throwsTrying
npm install
throws:and throws additional errors when trying
--force
or--legacy-peer-deps
as suggested in the error output.I have attempted countless and aimless workarounds for this. Even trying
sed -i 's/20.15.1/20.17.0/g' package.json
and tryingyarn kbn bootstrap
again which fails due to attempting to write to the system top level directories instead of relatively to this extracted tarball (Where I want to put them to include them in packaging):There does not seem to be a flag for changing this to bootstrap node_modules in this relative path! (For building the modules into the package).
Upon trying
yarn install
with the samesed
version overwrite I get some success with a lot of warnings and the kibana package build successfully.But upon installing the package and running the kibana service it fails with:
Error: Cannot find module './polyfill'
!My next step would be to painstakingly trace scripts/kbn and figure out how to relatively install them myself but I wanted to make this issue before getting to that point in a week's time. But I get the feeling
yarn install
already took care of the missing pieces of node_packages -- I'm hoping there's a simple way to fix this polyfill issue as seen in the sed+yarn-install route I took. But I'm at a point where time is being wasted and kibana does not have a working package for the current version for Archlinux users, which I would rather not be the case.Steps to reproduce:
Expected behavior:
Being able to build a working kibana package for Archlinux users from this tar.gz release. (This is what I do, but as of a few months ago modules are missing on startup and trying to hack slash and build the node_modules with the tarball and a supported nodejs release fails every way I slice it)
Screenshots (if relevant):
NA
Errors in browser console (if relevant):
NA
Provide logs and/or server output (if relevant):
Any additional context:
I'm not the best with software written with node and the familiar cli programs for preparing to run a project but I've tried what I've tried detailing above (And a lot more trust me) to try and get this working with no luck.
I'm trying to to rely on
nvm
because it's not in the official repositories for Archlinux so anyone trying to also build the kibana Archlinux User Repository package I maintain here would have to rely on it too.The text was updated successfully, but these errors were encountered: