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.7k 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 Both. My upgrade.log

      
      Upgrade started - Paz Tem 12 22:41:23 +03 2020
      system is Linux raspberrypi 4.19.118+ #1311 Mon Apr 27 14:16:15 BST 2020 armv6l GNU/Linux
      the os is Distributor ID: Raspbian Description: Raspbian GNU/Linux 10 (buster) Release: 10 Codename: buster
      user requested to apply changes
      doing test run = false
      
      saving custom.css
      remote name = origin
      upgrading from version 2.11.0 to 2.12.0
      fetching latest revisions
      git fetch rc=0
      current branch = master
      On branch master
      Your branch is up to date with 'origin/master'.
      
      Changes not staged for commit:
        (use "git add <file>..." to update what will be committed)
        (use "git checkout -- <file>..." to discard changes in working directory)
      
      	modified:   installers/mm.sh
      	modified:   modules/default/newsfeed/newsfeed.js
      	modified:   package-lock.json
      	modified:   package.json
      
      Untracked files:
        (use "git add <file>..." to include in what will be committed)
      
      	0
      	core
      	css/icons/
      	css/save_custom.css
      	fonts/LemonMilk.otf
      	installers/pm2_MagicMirror.json
      	run-start.sh
      
      no changes added to commit (use "git add" and/or "git commit -a")
      there are 4 local files that are different than the master repo
      
         installers/mm.sh
         modules/default/newsfeed/newsfeed.js
         package-lock.json
         package.json
      
      save/restore files selection = n
      restoring installers/mm.sh from repo
      restoring modules/default/newsfeed/newsfeed.js from repo
      restoring package-lock.json from repo
      restoring package.json from repo
      test merge result rc='' , if empty, no conflicts
      executing merge, apply specified
      merge result rc= 0
       Already up to date.
      processor architecture is armv6l
      updating MagicMirror runtime, please wait
      
      > magicmirror@2.12.0 install /home/pi/MagicMirror
      > echo "Installing vendor files ...
      " && cd vendor && npm install --loglevel=error
      
      Installing vendor files ...
      
      audited 150 packages in 44.188s
      found 8 vulnerabilities (7 low, 1 high)
        run `npm audit fix` to fix them, or `npm audit` for details
      
      > magicmirror@2.12.0 postinstall /home/pi/MagicMirror
      > npm run install-fonts && echo "MagicMirror installation finished successfully! 
      "
      
      
      > magicmirror@2.12.0 install-fonts /home/pi/MagicMirror
      > echo "Installing fonts ...
      " && cd fonts && npm install --loglevel=error
      
      Installing fonts ...
      
      updated 1 package and audited 1 package in 19.099s
      found 0 vulnerabilities
      
      MagicMirror installation finished successfully! 
      
      audited 1050 packages in 275.039s
      
      74 packages are looking for funding
        run `npm fund` for details
      
      found 62 vulnerabilities (61 low, 1 moderate)
        run `npm audit fix` to fix them, or `npm audit` for details
      npm install completed - Paz Tem 12 22:46:48 +03 2020 on base
      package.json update for armv6l completed ok
      downloading dumpactivemodules script
      
      processing dependency changes for active modules with package.json files
      processing for module MMM-MyPrayerTimes please wait
      ----------------------------------
      npm notice created a lockfile as package-lock.json. You should commit this file.
      added 2 packages from 6 contributors and audited 2 packages in 12.29s
      found 0 vulnerabilities
      
      processing complete for module MMM-MyPrayerTimes
      processing for module MMM-PIR please wait
      ----------------------------------
      
      > epoll@2.0.10 install /home/pi/MagicMirror/modules/MMM-PIR/node_modules/epoll
      > node-gyp rebuild
      
      make: Entering directory '/home/pi/MagicMirror/modules/MMM-PIR/node_modules/epoll/build'
        CXX(target) Release/obj.target/epoll/src/epoll.o
        SOLINK_MODULE(target) Release/obj.target/epoll.node
        COPY Release/epoll.node
      make: Leaving directory '/home/pi/MagicMirror/modules/MMM-PIR/node_modules/epoll/build'
      npm notice created a lockfile as package-lock.json. You should commit this file.
      added 6 packages from 9 contributors and audited 6 packages in 57.611s
      found 0 vulnerabilities
      
      processing complete for module MMM-PIR
      restoring custom.css
      removing git alias
      Upgrade ended - Paz Tem 12 22:48:25 +03 2020
      
      Upgrade started - Sal Tem 14 17:31:45 +03 2020
      system is Linux raspberrypi 4.19.118+ #1311 Mon Apr 27 14:16:15 BST 2020 armv6l GNU/Linux
      the os is Distributor ID: Raspbian Description: Raspbian GNU/Linux 10 (buster) Release: 10 Codename: buster
      user requested to apply changes
      doing test run = false
      
      saving custom.css
      remote name = origin
      local version 2.12.0 already same as master 2.12.0
      restoring custom.css
      removing git alias
      Upgrade ended - Sal Tem 14 17:31:48 +03 2020
      
      Upgrade started - Cum Eki 30 11:24:00 +03 2020
      system is Linux raspberrypi 4.19.118+ #1311 Mon Apr 27 14:16:15 BST 2020 armv6l GNU/Linux
      the os is Distributor ID: Raspbian Description: Raspbian GNU/Linux 10 (buster) Release: 10 Codename: buster
      user requested to apply changes
      doing test run = false
      
      saving custom.css
      restoring file    package.json before switch back to master branch
      package-lock.json: needs merge
      remote name = origin
      local version 2.13.0 already same as master 2.13.0
      restoring custom.css
      removing git alias
      Upgrade ended - Cum Eki 30 11:24:05 +03 2020
      
      
      S 1 Reply Last reply Reply Quote 0
      • S Do not disturb
        sdetweil @uok825
        last edited by

        @uok825 those are from 2020

        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 haven’t upgraded since 2020. Now when I run your script, nothing happens?

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

            @uok825 cut and paste the whole line from the github page, right

            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 Yeah.
              00349a3f-0038-4570-bdcb-1f06f9da35b9-image.png

              S 1 Reply Last reply Reply Quote 0
              • S Do not disturb
                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 Do not disturb
                    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 Do not disturb
                        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 Do not disturb
                            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 Do not disturb
                                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 Do not disturb
                                    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 Do not disturb
                                        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 Do not disturb
                                            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

                                            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