openhab / openhabian

openHABian - empowering the smart home, for Raspberry Pi and Debian systems
https://community.openhab.org/t/13379
ISC License
818 stars 251 forks source link

npm not installed ? #1785

Closed mstormi closed 1 year ago

mstormi commented 1 year ago

On assembling a new openHABian release, I noticed it isn't installing npm any longer.

See https://github.com/openhab/openhabian/actions/runs/5270352273/jobs/9529728918#step:8:476

/opt/openhabian/./functions/nodejs-apps.bash: line 79: npm: command not found

@Larsen-Locke would you be willing to figure out ? There has been released a new Raspi OS image to contain npm (or no more?) or to at least come with changes there that would be the first thing I'd be looking at.

Larsen-Locke commented 1 year ago

What I saw in a quick check is that in helpers.bash node.js is checked against v16.x (line 653) whereas the installation routine will install v18 (nodejs-apps.bash line 12). I haven't started with openhab4 yet so I cannot test. So either we remove the version check of node (do we really need that?) or check if version is equal or higher than v16 (which I think is not completely trivial in bash).

mstormi commented 1 year ago

I've changed that to match v16-v19 BUT seems npm just isn't there See https://github.com/openhab/openhabian/actions/runs/5333879939/jobs/9664938161#step:8:525 And just 5 lines up it says node v18 IS installed. I'm not getting that, isn't npm part of that package ?

mstormi commented 1 year ago

So either we remove the version check of node (do we really need that?)

Which check? If you look at the places that call node_is_installed() I don't think that would make a difference, those look fine to me

Larsen-Locke commented 1 year ago

I found it: The gpg-keys were still v16 instead of v18. That's why node didn't install. I started a PR with the changes (including the latest LTS-version of nodeJS). PR: https://github.com/openhab/openhabian/pull/1787

mstormi commented 1 year ago

Fixed-By: #1787