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
Please take this up with packaging@, this has nothing to do with the build service.
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
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
buildservice@lists.opensuse.org