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.

    issues updating MMM-calendar EXT3

    Scheduled Pinned Locked Moved Solved Troubleshooting
    19 Posts 4 Posters 5.3k Views 4 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.
    • S Do not disturb
      sdetweil @JMac
      last edited by

      @JMac the package-lock.json was updated by the last npm install

      so do this, in the module folder

      git checkout package-lock.json
      

      then the

      npm install
      

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      J 1 Reply Last reply Reply Quote 0
      • J Offline
        JMac @sdetweil
        last edited by JMac

        @sdetweil used both of those then tried to up date the rest of the module and still get the same issue when running git pull in the module folder, this is what it says;
        hint: Pulling without specifying how to reconcile divergent branches is
        hint: discouraged. You can squelch this message by running one of the following
        hint: commands sometime before your next pull:
        hint:
        hint: git config pull.rebase false # merge (the default strategy)
        hint: git config pull.rebase true # rebase
        hint: git config pull.ff only # fast-forward only
        hint:
        hint: You can replace “git config” with “git config --global” to set a default
        hint: preference for all repositories. You can also pass --rebase, --no-rebase,
        hint: or --ff-only on the command line to override the configured default per
        hint: invocation.
        Updating 3ca76d9…dfe2425
        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

        S 1 Reply Last reply Reply Quote 0
        • S Do not disturb
          sdetweil @JMac
          last edited by

          @JMac said in issues updating MMM-calendar EXT3:

          used both of those then tried to up date the rest of the module

          sorry, brain fart…

          you need the git pull
          after the git reset , before the npm install

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          J 1 Reply Last reply Reply Quote 0
          • J Offline
            JMac @sdetweil
            last edited by

            @sdetweil so just to be clear its,
            git checkout package-lock.json
            git reset
            git pull
            npm install

            within the calendar ext3 module folder?

            S 1 Reply Last reply Reply Quote 0
            • S Do not disturb
              sdetweil @JMac
              last edited by sdetweil

              @JMac no
              edited

              # put package-lock.json back to last git clone state
              git checkout package-lock.json
              # update the module
              git pull
              # rerun npm install  with new code
              npm install
              

              all in the module folder

              # lines are comments and will be ignored if you copy paste that whole thing
              

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • N Offline
                nschertz
                last edited by

                @sdetweil I just encountered the same problem and followed your instructions in your last post. This did not fix the problem. I continue to get the same error

                “your local changes to the following files would be overwritten by the merge: package-lock.json
                please commit them or stash them before you merge.
                Aborting.”

                Thoughts on what to do next?

                Norb

                S 1 Reply Last reply Reply Quote 0
                • S Do not disturb
                  sdetweil @nschertz
                  last edited by sdetweil

                  @nschertz you ARE in the module folder, right?
                  edited

                  cd ~/MagicMirror/modules/MMM-CalendarExt3
                  git checkout package-lock.json
                  git pull
                  npm install
                  

                  right?

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  BKeyportB N 2 Replies Last reply Reply Quote 0
                  • BKeyportB Offline
                    BKeyport Module Developer @sdetweil
                    last edited by

                    just for information, the real issue is the the lock file is included in the package, right?

                    The "E" in "Javascript" stands for "Easy"

                    S 1 Reply Last reply Reply Quote 0
                    • S Do not disturb
                      sdetweil @BKeyport
                      last edited by sdetweil

                      @BKeyport and it gets updated by npm install

                      You can do npm ci
                      Which will ONLY install the EXACT versions listed in the lock file, even if it’s wrong for your system

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      1 Reply Last reply Reply Quote 0
                      • N Offline
                        nschertz @sdetweil
                        last edited by

                        @sdetweil Correct. After executing “git reset package-lock.json”, I get the message “Unstaged changes after reset:
                        M package-lock.json”

                        I then run git pull and get
                        pi@MagicMirror:~/MagicMirror/modules/MMM-CalendarExt3 $ git pull

                        Updating e93534d…5f276d4
                        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

                        S 1 Reply Last reply Reply Quote 0
                        • S Do not disturb
                          sdetweil @nschertz
                          last edited by sdetweil

                          @nschertz sorry, oops… wrong command!

                          git checkout package-lock.json
                          

                          fixed the prior posts with note edited

                          Sam

                          How to add modules

                          learning how to use browser developers window for css changes

                          1 Reply Last reply Reply Quote 0
                          • N Offline
                            nschertz
                            last edited by

                            to clarify… execute “git checkout package.json” instead of " git reset package.json" or execute “git checkout package.json” and " git reset package.json"?

                            S 1 Reply Last reply Reply Quote 0
                            • S Do not disturb
                              sdetweil @nschertz
                              last edited by

                              @nschertz git checkout

                              restores it from the local source repo

                              git reset
                              removes it from the staged to be submitted as a change

                              I posted the checkout first, then a user posted reset and I blindly followed it…
                              my mistake

                              Sam

                              How to add modules

                              learning how to use browser developers window for css changes

                              1 Reply Last reply Reply Quote 0
                              • N Offline
                                nschertz
                                last edited by

                                oops meant to type

                                to clarify… execute “git checkout package-lock.json” instead of " git reset package-lock.json" or execute “git checkout package-lock.json” and " git reset package-lock.json"?

                                1 Reply Last reply Reply Quote 0
                                • N Offline
                                  nschertz
                                  last edited by

                                  Got it ! git checkout… worked! Thanks for the clarification on what git reset does verses git checkout.

                                  S 1 Reply Last reply Reply Quote 1
                                  • S Do not disturb
                                    sdetweil @nschertz
                                    last edited by

                                    @nschertz awesome… sorry for the misdirection

                                    Sam

                                    How to add modules

                                    learning how to use browser developers window for css changes

                                    S 1 Reply Last reply Reply Quote 0
                                    • S Do not disturb
                                      sdetweil @sdetweil
                                      last edited by sdetweil

                                      in the git model

                                      the files you see are called the working directory
                                      and the repo is hidden in the .git folder

                                      that is where the actual ‘state’/contents of each file exists

                                      so checkout copies the contents from the repo to the working directory

                                      if you were developing and had a change
                                      git status would show changed files in the working directory

                                      git diff will show WHAT changed on each file

                                      to lock it down in the local copy of the repo
                                      you git add it to a potential ‘commit’,
                                      then git status shows it as ‘staged’

                                      to REMOVE it from staged, use the git reset command

                                      git commit puts it into the local repo as a change

                                      then you ‘push’ your entire local repo to the parent (git remote -v)

                                      and the changes (if accepted) are merged and that change is in the master for
                                      all new ‘pulls’

                                      Sam

                                      How to add modules

                                      learning how to use browser developers window for css changes

                                      N 1 Reply Last reply Reply Quote 0
                                      • N Offline
                                        nschertz @sdetweil
                                        last edited by

                                        @sdetweil thank you ! This explanation is very helpful. I’m still a little new to the git environment.

                                        1 Reply Last reply Reply Quote 1
                                        • S sdetweil has marked this topic as solved on

                                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                        With your input, this post could be even better 💗

                                        Register Login
                                        • 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