Re: Building an NPM (or electron?) package (in my case https://github.com/kubernetes-sigs/kui)
Hi Johannes, Johannes Kastl <kastl@b1-systems.de> writes:
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 <dcermak@suse.com> Software Engineer Development tools SUSE Software Solutions Germany GmbH Maxfeldstr. 5 90409 Nuremberg Germany (HRB 36809, AG Nürnberg) Managing Director/Geschäftsführer: Ivo Totev
Hi Gents, Am Montag, 10. Januar 2022, 16:30:00 CET schrieb Dan Čermák:
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 ;-)
..this is a long standing recommendation :-/ as this NPM stuff is not really meant for RPM packaging.
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.
Tried the same some half year ago and got stuck with phantomjs-prebuild, I think it was. Adam Majer was working on that at the time. I put him in cc, mabe he knows more in between Cheers Axel
participants (2)
-
Axel Braun
-
Dan Čermák