Closed WolfgangSn closed 4 months ago
@Larsen-Locke you introduced that in https://github.com/openhab/openhabian/commit/4e8f73154021a3c8e1fdb23f84bb8edad202b0d8
Can you please revoke or fix it ?
o.k. I made a PR which changes back like it was before (install only nodejs). I'm absolutely confused: Because of bookworm I added npm because npm was not automatically installed together with nodejs. Maybe somebody with more knowledge about nodejs should help here. Maybe we should remove all this keyring-stuff. But then I think it doesn't work with buster.
o.k. I made a PR which changes back like it was before (install only nodejs).
ok thanks I merged it.
Maybe we should remove all this keyring-stuff. But then I think it doesn't work with buster.
No we should not. Using keyring-protected repos is a fundamental build principle.
Check out the bookworm openHABian build (the new 3rd downloadable image) if it contains npm or works without, then if required add conditional install of npm on bookworm only.
@Larsen-Locke BATS build check failing because of missing npm. https://github.com/openhab/openhabian/actions/runs/7854205779/job/21434704483#step:8:276
I'm not sure. I think it's a debian bug that nodejs and npm cannot be installed together but I don't know how to handle this other than to wait that the debian (or RaspiOS?) people find out.
Can you split it into two commands install nodejs first then npm second ? Make sure to continue in the script should any of them fail. Please test before making it a PR.
May I kindly ask why nodejs and npm are needed together ? In the past only nodejs was installed and everything is working. Just would like to better understand the problem.
nodejs is included in bookworm but without npm. This was an attempg (not working) for a solution that works with all different debian versions. "Everything is working" is relative. We need it working for all different os
If I understand correctly it was not needxed to install npm on pre-bookworm. So I suggest to keep the code to install nodejs, then check for an installed npm and only install it when it's not there. That should work on bookworm while not break install on any other distro, or am I overlooking something ?
No we should not. Using keyring-protected repos is a fundamental build principle.
Nobody wants to remove package protection. But we don't need to import keys if already included in the os. Check out the bookworm openHABian build (the new 3rd downloadable image) if it contains npm or works without, then if required add conditional install of npm on bookworm only.
As I said: In bookworm npm has to be installed with an apt-get install -y npm. Just add that and it should be fine. Sorry I cannot help at the moment.
If I understand correctly it was not needed to install npm on pre-bookworm.
yes. Because it's installed with nodejs. Don't ask me why npm is sometimes installed with nodejs and sometimes has to be installed seperately. But I checked twice.
I think too that the best we can to is an additional apt-get install -y npm if the os is bookworm
@Larsen-Locke
"Everything is working" is relative. We need it working for all different os
I am sorry for the wording "everything". I was in a hurry when I wrote that entry. What I wanted to say is that functionality is available on my system - and yes - you are right it needs to work in all different OSs.
Did a quick analysis and I think I now have a more clear picture why it works in my case, why not for others and why the error pops up.
In my case neither nodejs nor npm was installed when I started to use the beta bookworm image. So openhabian-config installed nodejs from deb.nodesource.com. This installation contains npm related stuff in the nodejs package.
Looking into the bookworm distribution indeed nodejs does not contain npm.
So as far as I understand if npm is already installed from OS installing nodejs from deb.nodesource.com it will complain about the installed npm.
It's impossible to track workings of a package/feature such as frontail across all variants of images, repos, distros, even more so as with repos and packages ever changing, it's a moving target.
I've now changed code to install npm whenever it isn't there right after nodejs installation. The Github cloud install worked incl. the BATS test (which among others is attempting to install frontail). It still fails but would have passed if there hadn't been an issue with another package, but that's not related to node/npm.
Please validate if possible.
As there was no further feedback I assume it's currently working. Reopen here if not.
Issue information:
nodejs and npm are to be installed together in nodejs-apps.bash since code introduction of
According to apt info nodejs these are conflicting packages and can't be installed together.
See also https://community.openhab.org/t/unable-to-install-frontail-on-fresh-install-oh-4/153751/3