MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    SOLVED Update script not updating

    Troubleshooting
    3
    13
    564
    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.
    • ankonaskiff17
      ankonaskiff17 last edited by

      @sdetweil I used the scripts you provide but I’m having some issues and want to get some clarification so I don’t break the MM I just got running yesterday.

      First script is a run through but with no changes being applied
      Second script is same as first script but with apply attached to end of script which will update any modules or core components that are out of date is how I understand. Is that accurate?

      Also, what are ramifications of answering n to question below?
      I know what the mm.sh issue is and I caused it but it doesn’t cause any functional problems.

      installers/mm.sh
      modules/default/calendar/calendar.js
      do you want to save these files for later (Y/n)?

      I ran the second apply script but it doesn’t seem to be doing anything. I am getting a notification in top banner for update to MMM-Jast but it is not being found by the scripts.
      Shouldn’t calendar.js have been repaired? Shouldn’t it have picked up the MMM-Jast out of date?

      S 2 Replies Last reply Reply Quote 0
      • S
        sdetweil @ankonaskiff17 last edited by sdetweil

        @ankonaskiff17 update only does the base mm, no add on modules. those have their own procedures.

        on calendar, in either case the calendar.js of the base should have been restored, and then the update applied.

        if u still think there is an issue, email me the installers/upgrade.log

        same userid at gmail

        Sam

        Create a working config
        How to add modules

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

          @ankonaskiff17 and the upgrade ONLY works if the mm versions are different

          if u are on 2.19, and current is 2.19, then nothing to do. you can ‘force’ it do do the apply, by using force as the parm instead of apply. this was added for the case where someone started a manual upgrade, but got stuck…

          but again, the script does not upgrade modules.

          Sam

          Create a working config
          How to add modules

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

            @sdetweil First thing I did with the MMM-Jast notification was to look if there was a section in the Readme about updating module but I think it was triggered externally.

            On Github the dates are older but there is this at very top, How do I address that?

            dependency.jpg

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

              @ankonaskiff17 so in general, modules update with

              cd ~/MagicMirror/modules/module_folder
              git pull
              

              and if the module has a package.json, then

              npm install
              

              also in the module folder

              Sam

              Create a working config
              How to add modules

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

                @sdetweil I found a different module with update instructions and did git pull in MMM-Jast but git pull yielded the following

                From https://github.com/jalibu/MMM-Jast
                5a5f781..8b771b6 main -> origin/main
                * [new tag] v2.6.3 -> v2.6.3
                Updating 5a5f781..8b771b6
                error: Your local changes to the following files would be overwritten by merge:
                package-lock.json
                Please commit your changes or stash them before you merge.
                Aborting
                pi@mirror:~/MagicMirror/modules/MMM-Jast $

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

                  @ankonaskiff17 yeh, erase package-lock.json
                  then git pull, npm install will update that file again

                  Sam

                  Create a working config
                  How to add modules

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

                    @sdetweil That is standard/typical of how to update a module?

                    Resolved notification

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

                      @ankonaskiff17 yes… no one should ship a package-lock.json as part of their release

                      this is only used by testing systems to make sure the environment is exact

                      Sam

                      Create a working config
                      How to add modules

                      strawberry 3.141 1 Reply Last reply Reply Quote 0
                      • strawberry 3.141
                        strawberry 3.141 Project Sponsor Module Developer @sdetweil last edited by

                        @sdetweil actually the opposite is true, everyone should ship a lock file with its repository to ensure you will get the exact same dependencies that were tested with and not something newer which can introduce issues.

                        But if you just run npm install npm will update the lock file. So the effect is like not shipping a lock file at all.

                        Instead, you should use npm ci if there is a lock file https://docs.npmjs.com/cli/v8/commands/npm-ci. This makes sure that you have exactly the same dependencies no matter if there is a newer version available.

                        Please create a github issue if you need help, so I can keep track

                        S 1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 1 / 2
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy