I have migrated two raspberries from 3.4 to 4.x. The first one a couple of weeks ago and the last one yesterday.
I see one discrepancy as the first one still runs on nodejs v14 while the other one is already on v16.
Hit:4 https://deb.nodesource.com/node_14.x bullseye InRelease
Hit:4 https://deb.nodesource.com/node_16.x bullseye InRelease
apt update will not update to v16 as the source list (
nodesource.list) did not get updated prior.
This means that an update command or script did not work properly in the past.
Does anybody have an explanation and how can I make sure the there are not more discrepancies, e.g. by comparing two script files?
Sure, another option is a complete re-install
Can i simply edit the nodesource.list an replace the version?
deb [signed-by=/usr/share/keyrings/nodejs.gpg] https://deb.nodesource.com/node_14.x bullseye main
deb-src [signed-by=/usr/share/keyrings/nodejs.gpg] https://deb.nodesource.com/node_14.x bullseye main
In the other sources .list files I found that deb-src is commented out while there is a second entry starting with src. Not sure what that means.
As far as I’m aware, OH doesn’t actually use nodejs directly. So is there an issue here or just a difference you’ve noticed?
Without knowing how you installed nodejs in the first place and why
Not necessarily. If you’ve added the repo manually in the past you likely told it which version to use. Node definitely has an “I’m not going to update between major version numbers unless you force me to” approach to updates. It is not outside their normal operating procedure that they expect you to edit the sources list to upgrade to a new major version number.
Short of just diffing all the .list files between the two machines, no.
Probably but I read up on what nodejs has to say in their docs first.
Maybe, though they may use a different signing key.
These are all open source programs. You can install the source code along with the compiled binaries.
I guess it is part of openhabian installation because of a dependency with frontail. Probably there are some more dependencies.
I never installed node.js myself.
Thanks for all the other answers.
Doesn’t npm require node.js either?
npm is the node package manager. It is a part of the node package.
Node is necessary in openhabian for frontail, node-red and zigbee2mqtt.
is one of them a migrated and the other one a system that was setup with a new image ?
no. Both of them are migrated from 3.4 but with a time difference of a couple of weeks.
It is not of a big issue. Just wondering if the earlier migration might have missed some other important updates or changes of settings.
I don’t know if openhabian ever does an upgrade of added repositories. Don’t think so.
E.g. have a look to the nodejs.bash script. It adds an entry to the nodejs repository.
currently it is pointing to “https://deb.nodesource.com/node_18.x $myDistro main”
Based on the github history of nodejs.bash you can check when the entry for18.x was created in the script.
As far as I understand the script the version of nodejs repo that you find in the file depends on the time when the repo was requested to be added by you as user to install it using openhabian-config e.g. frontail installation or any other service that requires the repo.