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.

    Cannot find module "moment"

    Scheduled Pinned Locked Moved Troubleshooting
    98 Posts 2 Posters 54.4k Views 2 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.
    • U Offline
      uok825 @sdetweil
      last edited by

      @sdetweil Yeah.
      00349a3f-0038-4570-bdcb-1f06f9da35b9-image.png

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

        @uok825 hm, that means the curl to get the script is failing

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        U 1 Reply Last reply Reply Quote 0
        • U Offline
          uok825 @sdetweil
          last edited by

          @sdetweil I can get a new file called upgrade-script.sh and paste all code in it? Thats will work i think?

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

            @uok825 yes should

            i am in the car for another half an hour

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            U 1 Reply Last reply Reply Quote 0
            • U Offline
              uok825 @sdetweil
              last edited by

              @sdetweil Okey. I will do ./upgrade-script.sh right?

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

                @uok825 yes, and with apply as parm

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                U 1 Reply Last reply Reply Quote 0
                • U Offline
                  uok825 @sdetweil
                  last edited by

                  @sdetweil said in Cannot find module "moment":

                  @uok825 yes, and with apply as parm

                  pi@raspberrypi:~/MagicMirror $ bash upgrade-script.sh apply
                  No LSB modules are available.
                  doing test run = false
                  update log will be in /home/pi/MagicMirror/installers/upgrade.log

                  saving custom.css
                  reverting to master branch from develop, saving changed files
                  saving file package.json as package.json.save before switch back to master branch
                  restoring file package.json before switch back to master branch
                  error: you need to resolve your current index first
                  unable to change back to master branch, stopping execution

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

                    @uok825 said in Cannot find module "moment":

                    you need to resolve your current index first

                    looks like some attempt to merge failed

                    run this in the MagicMirror folder

                    git diff --name-only --diff-filter=U
                    

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    U 1 Reply Last reply Reply Quote 0
                    • U Offline
                      uok825 @sdetweil
                      last edited by uok825

                      @sdetweil
                      pi@raspberrypi:~/MagicMirror $ git diff --name-only --diff-filter=U
                      package-lock.json
                      c5c475d9-fcfe-47e0-aa4f-b226eee2b03a-image.png

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

                        @uok825 that’s weird. that file is rebuilt every install

                        rm package-lock.json
                        then
                        git status
                        and git branch

                        also, connect via ssh, then everything will be in text so you can just copy/paste

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        U 1 Reply Last reply Reply Quote 0
                        • U Offline
                          uok825 @sdetweil
                          last edited by uok825

                          @sdetweil rm: ‘package-lock.json’ cant deleted: No such a file or folder.
                          5aca734c-9b5e-48e1-ab05-0b5bec5b1818-image.png
                          81e0cc4b-30df-4f7e-bd36-0b0cab44d1e4-image.png

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

                            @uok825 ok, still weird

                            do git checkout master

                            Sam

                            How to add modules

                            learning how to use browser developers window for css changes

                            U 1 Reply Last reply Reply Quote 0
                            • U Offline
                              uok825 @sdetweil
                              last edited by

                              @sdetweil said in Cannot find module "moment":

                              git checkout master

                              cd4d0118-0f5d-4070-98f5-56760aea9ae6-image.png

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

                                @uok825 ok try these two commands
                                <file> is package-lock.json

                                this restores the file status in the index

                                git reset – <file>

                                then check out a copy from the index

                                git checkout – <file>

                                notice that is two dashes

                                Sam

                                How to add modules

                                learning how to use browser developers window for css changes

                                U 2 Replies Last reply Reply Quote 0
                                • U Offline
                                  uok825 @sdetweil
                                  last edited by

                                  @sdetweil I’ll do ’ git reset - package-lock-json ’ right?

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

                                    @uok825 and then git checkout …

                                    and then git status

                                    Sam

                                    How to add modules

                                    learning how to use browser developers window for css changes

                                    1 Reply Last reply Reply Quote 0
                                    • U Offline
                                      uok825 @sdetweil
                                      last edited by

                                      @sdetweil Sorry. I dont understand Sam. Can you help a little. What exactly will I write?

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

                                        @uok825 there are two commands

                                        git reset -- package-lock.json
                                        

                                        and

                                        git checkout -- package-lock.json
                                        

                                        then git status

                                        Sam

                                        How to add modules

                                        learning how to use browser developers window for css changes

                                        U 1 Reply Last reply Reply Quote 0
                                        • U Offline
                                          uok825 @sdetweil
                                          last edited by

                                          @sdetweil Alright, Thanks! 878de904-2923-4e44-8522-bea1c1f642c3-image.png

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

                                            @uok825 ok, now,

                                            git checkout master

                                            Sam

                                            How to add modules

                                            learning how to use browser developers window for css changes

                                            U 1 Reply Last reply Reply Quote 0

                                            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
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 2 / 5
                                            • 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