Building an NPM (or electron?) package (in my case https://github.com/kubernetes-sigs/kui)
Hi all, I tried the wiki and some search-foo but ended up with deprecated things on how to build a NPM package (or something that looks like it). https://en.opensuse.org/openSUSE:Packaging_nodejs In my case I wanted to try building kui from https://github.com/kubernetes-sigs/kui, which to me looks like NPM-Foo: Quoting the README:
I don't trust the prebuilts
We hear you. Choose your platform (e.g. mac:amd64), execute the following, then look in ./dist/electron.
git clone git@github.com:kubernetes-sigs/kui.git && cd kui && npm ci && \ npm run build:electron:mac:amd64
Might not be the best package to get going with NPM, as it seems rather complex. So any hints are highly appreciated. Kind Regards Johannes -- Johannes Kastl Linux Consultant & Trainer Tel.: +49 (0) 151 2372 5802 Mail: kastl@b1-systems.de B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg http://www.b1-systems.de GF: Ralph Dehner Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
Please take this up with packaging@, this has nothing to do with the build service. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."
Hi Andreas, On 10.01.22 at 16:18 Andreas Schwab wrote:
Please take this up with packaging@, this has nothing to do with the build service.
Of course you are right. Sorry for the noise... Johannes -- Johannes Kastl Linux Consultant & Trainer Tel.: +49 (0) 151 2372 5802 Mail: kastl@b1-systems.de B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg http://www.b1-systems.de GF: Ralph Dehner Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537
Hi Johannes,
Johannes Kastl
Hi all,
I tried the wiki and some search-foo but ended up with deprecated things on how to build a NPM package (or something that looks like it).
https://en.opensuse.org/openSUSE:Packaging_nodejs
In my case I wanted to try building kui from https://github.com/kubernetes-sigs/kui, which to me looks like NPM-Foo:
Quoting the README:
I don't trust the prebuilts
We hear you. Choose your platform (e.g. mac:amd64), execute the following, then look in ./dist/electron.
git clone git@github.com:kubernetes-sigs/kui.git && cd kui && npm ci && \ npm run build:electron:mac:amd64
Might not be the best package to get going with NPM, as it seems rather complex.
Afaik the current recommended approach is to avoid packaging node.js
applications ;-)
Now for useful answers: a year ago I asked the same question and was
pointed towards obs-service-node_modules[1], which should help you with
bundling all the required dependencies. Unfortunately I'm afraid that's
all I can help you with.
Also, please be very careful with Electron: it's a licensing minefield
due to the inclusion of ffmpeg and thus various video
encoders/decoders. Iirc Tomáš Chvátal told me a few years ago how much
of a pain in the rear it was to properly build Chromium offline (which
is effectively Electron) and I'd rate that as a 1/10, would not
recommend doing unless absolutely necessary.
Hope this helps,
Dan
Footnotes:
[1] https://github.com/openSUSE/obs-service-node_modules
--
Dan Čermák
participants (3)
-
Andreas Schwab
-
Dan Čermák
-
Johannes Kastl