MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    [HowTo] Update MM/Modules safely.

    Scheduled Pinned Locked Moved Tutorials
    4 Posts 3 Posters 1.3k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      MMRIZE
      last edited by MMRIZE

      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 update

      Nevertheless, if you still want to update,

      2. Prepare the backup

      Backup your config/config.js and css/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 recommend NVM to you to manage versions of NodeJS)
      Some specific native-node-module which needs rebuild (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.

      1. 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.
      2. 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!

      S 1 Reply Last reply Reply Quote 3
      • S Offline
        sdetweil @MMRIZE
        last edited by

        @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_scripts

        one to test and discover any issues before making any changes
        one to actually DO the upgrade

        having 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-restore

        backup, however you do it, is a critical step for insuring success.

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        ankonaskiff17A 1 Reply Last reply Reply Quote 1
        • ankonaskiff17A Offline
          ankonaskiff17 @sdetweil
          last edited by

          @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.

          S 1 Reply Last reply Reply Quote 0
          • S Offline
            sdetweil @ankonaskiff17
            last edited by sdetweil

            @ankonaskiff17 click my userid, 3 dots right, start chat

            or send email to the same userid at gnail

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            Enjoying MagicMirror? Please consider a donation!
            MagicMirror created by Michael Teeuw.
            Forum managed by Sam, technical setup by Karsten.
            This forum is using NodeBB as its core | Contributors
            Contact | Privacy Policy