Read the statement by Michael Teeuw here.
Magic Mirror and NodeJS
-
I have MagicMirror installed on a Raspberry Pi 3, a few days ago I needed to install mqtt because I need it for an integration that I want to implement on one of the modules.
When I tried to install it it gave some errors, from what we understood it was due to a version of NodeJS that was too old, at that point I installed a more recent version and set it as nodejs by default, Magic Mirror started but if I put a referring to mqtt it gave me an error at the end of everything I found myself having 4 versions of nodejs installed on the Raspberry installed via nvm:
14.21.3
16.20.2
20.10.0
21.4.0But the problem still remained, doing various searches on the internet I read that often even if one version is set by default to be used by the various nodejs applications then another one is used and to be sure to verify by putting a log inside the application :
console.log(process.version);The result was surprising: v12.13.0
Which is not among the versions installed via nvm, evidently 2/3 years ago when I created the MagicMirror I had installed nodejs in another way, honestly I don’t remember how I did it and what but the fact is that I can’t find the version it uses on the Raspberry by launching nvm ls.
At this point I’m wondering how I could set MagicMirror so that it uses one of the other 4 versions installed with nvm or alternatively how I can update the “ghost” version that I can’t find
Thank you
-
@cldparisi the latest mm needs node v18 or up. as we have moved to to built in version of fetch, instead of the add on libraries
-
@sdetweil if you use my upgrade script I will upgrade nodejs too
-
@sdetweil - Sam, will your scripts install Nodejs and NPM? My SSD died and I’m having a hell of a time getting Nodejs installed on it. I keep getting errors about glibcc_3.4.29 and 3.4.30 not being found.
-
@reilley Yes, my script does everything you need to get running… BUT… it sounds like you are on buster (lsb_release -a)… and the latest nodejs doesn’t run on buster… SO
anyhow, look at my backup/restore scripts… makes backup of config.js, custom.css, all the links of the installed modules (where they came from) and any extra files created by the modules, token files, credentials…
then after reinstall mm… run restore to put back all that
https://github.com/sdetweil/MagicMirror-backup-restorethe backup is very small… 3 files of text, and maybe a few token files also text
can also save the repo in git, and restore/install from there
and provides ability to version backup… so you could restore to a different version… -
@sdetweil - I’ve been running on Bullseye up until until the SSD croaked. I just installed Bookworm 64 bit before I saw your reply and once it’s done updating, I’ll give your script a whirl. Weird that this was happening since I installed NodeJS with no problems a few months ago. Argh!!!
Thanks for the help as always!!!
-
@reilley the parts keep moving UP the currency chain… we need a lib, it needs 20.9, now need another lib, it needs 20.18.1, new electron, … the new nodejs versions need a new c++runtime lib… oops its not available on older OS… armv6l is really getting long in the tooth… (20.18.1 is the last version available …)
latest nodejs is 23… we checked and didn’t accept that… fixed on jan 1… but its hard to keep up…
can’t sit still
-
@sdetweil - I feel ya! Back from dinner with the wife and your script ran perfectly - thanks! Now, I’m tracking down a pesky weather module issue, grrrrr. I’ll definitely be taking advantage of your backup scripts as soon as I get this all working again. I don’t ever want to reinstall from scratch again, ugh.
-
@reilley said in Magic Mirror and NodeJS:
I’ll definitely be taking advantage of your backup scripts as soon as I get this all working again
note you can backup, and backup and backup and backup, over and over…
and each one has a git tag… and you can restore THAT version…
so, backup as much as you want, add a message on each so you know what you did in this version
(added weather, changed colors… whatever, in quotes)the list_tags command link will list them out