Read the statement by Michael Teeuw here.
[HowTo] Update MM/Modules safely.
-
1. Please don’t do it.
If your current MM is working without issue, and you don’t really need any new features of the updated version, Don’t update. If the new version still cannot solve your current issue explicitly, Don’t update.
Leave it as it is still being working. Dare to say again, Don’t updateNevertheless, if you still want to update,
2. Prepare the backup
Backup your
config/config.js
andcss/custom.css
files into somewhere safe.
And you might probably have some additional module-specific resources, like credential JSON, DotEnv(.env) files, or some data feeds/files. Backup them also.3. Check your OS.
A timeworn OS might need additional or newer dependencies for new MM/modules features.
So you might need to update your OS first. Especially Raspbian or any linux-based OS for SBC, just reinstall from scratch with formatting SD(or MMC). For windows/MacOS, It is less important, so you can ignore this.If you feel that a fresh reinstall might look somehow too much, at least an update to a recent version might be needed.
4. Check your environment.
NodeJS version and NPM version should be matched with MM’s requirement. Usually, requirements for
electron
would be those. (I recommendNVM
to you to manage versions of NodeJS)
Some specificnative-node-module
which needsrebuild
(electron-rebuild or node-gyp or something similar) would be affected by these version differences.5. new instance in another directory, if possible.
Ok, You are a dotard so will not format your RPI, and will not update your environment at all. It is up to you.
If so, at least you’d better install a new MM/modules in another directory, not update the current MM/modules directly.You can rename the current directory as an insurance. You can restore yours again at any time when you fail with a new version.
6. Installation is better/easier than Updating, always.
Trust me. Installation is easier than updating.
- Most module developers are describing well how to install but not how to update. (including me. sorry.) You probably already have experience with installation, just do it once again.
- The issues from different versioned dependencies would make all things messed up. A new installation could avoid many cases of them.
7. Remove
updateNotification
module.Sometimes, not knowing is the solution. Avoid update obsession.
Good luck!
-
@MMRIZE thanks. I agree. if it’s working, don’t change anything.
this is why my upgrade script is designed as a two pass approach.
https://github.com/sdetweil/MagicMirror_scriptsone to test and discover any issues before making any changes
one to actually DO the upgradehaving a log of both operations goes a long way to resolving any issues
the upgrade also checks for and re-initializes any modules we know have problems w electron or nodejs changes.
my backup and restore scripts give you ability to make regular backups and save them incrementally to GitHub, and restore from there as well . a nice to have tool if you have to rebuild your mm.
https://github.com/sdetweil/MagicMirror-backup-restorebackup, however you do it, is a critical step for insuring success.
-
@sdetweil How can I send you a PM/DM about a question I have.
Not bad, not good, just a question that I have that is probably not for the MM community writ large. -
@ankonaskiff17 click my userid, 3 dots right, start chat
or send email to the same userid at gnail