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