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.

    After 2.8 I'm having tons of issues. What are the steps from square 1 to get this working?

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    46 Posts 3 Posters 18.1k 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.
    • S Offline
      sdetweil @Gomalley
      last edited by

      @Gomalley you are missing some fundamentals.

      THIS is called install

      git clone ....  copies the code from github to your system
           at this point it will not run
           you need to change to the MagicMirror folder and execute npm install so that all the additional node 
              routines needed are loaded onto your system
      

      now, once you have installed

      there are updates every quarter…

      so, then in the MagicMirror folder you need to download the new code OVER the prior code
      so, you do

      cd ~/MagicMirror
      git pull
      

      but we are in the same position as during install…
      routines we need may have changed, or we may have decided to use something different

      so, once again, to get all the updates for other code we use

      cd ~/MagicMirror
      npm install
      

      BUT there is one more step…
      any modules YOU installed may have dependencies too
      SO, they (like MagicMirror) specify those dependencies in a package.json file

      so, we need to look thru ALL the non-default module folders looking for a package.json file
      if we find one, we need to run npm install in that modules folder too.
      repeat til all module folders with a package.json file

      now…

      the install script (raspberry.sh) does the
      git clone
      and
      npm install in tghe MagicMirror folder.

      my update script
      does all the update steps… (I just added a check for the MagicMirror folder being present)
      but you had to have done the install steps first…

      npm install by itself without download any MagicMirror code doesn’t do anything useful, as there is no package.json file in the uses home folder by default.

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      G 1 Reply Last reply Reply Quote 0
      • G Offline
        Gomalley @sdetweil
        last edited by

        @sdetweil I tried putting npm install into the modules and vendor folders but there weren’t that many json files in that directory.

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

          @Gomalley no. In the modules/MMM-??? Folders for the modules u have installed in addition to the base MagicMirror

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          G 1 Reply Last reply Reply Quote 0
          • G Offline
            Gomalley @sdetweil
            last edited by

            @sdetweil when i go to /home/pi/MagicMirror/modules
            these are the folders present: Default, node_modules, README.md
            If i further click into default i get a ton more (alert, calendar, clock, compliment s, currentweather, helloworld , newsfeed, …) Other than the magicmirror program, I have not installed anything else

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

              @Gomalley ok, wasnt clear u had just the base MagicMirror.

              If you do pm2 logs, what does it show?

              Also, what does npm -v show?

              U may need to upgrade npm

              npm i -g npm
              

              Then do the npm install again in the MagicMirror folder

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              G 2 Replies Last reply Reply Quote 0
              • G Offline
                Gomalley @sdetweil
                last edited by

                @sdetweil
                pi@raspberrypi:~ $ pm2 logs
                [PM2] Spawning PM2 daemon with pm2_home=/home/pi/.pm2
                internal/modules/cjs/loader.js:583
                throw err;
                ^

                Error: Cannot find module ‘shelljs’
                at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
                at Function.Module._load (internal/modules/cjs/loader.js:507:25)
                at Module.require (internal/modules/cjs/loader.js:637:17)
                at require (/usr/local/lib/node_modules/pm2/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
                at module.exports.Client.launchDaemon (/usr/local/lib/node_modules/pm2/lib/Client.js:244:7)
                at /usr/local/lib/node_modules/pm2/lib/Client.js:103:10
                at /usr/local/lib/node_modules/pm2/lib/Client.js:311:14
                at process._tickCallback (internal/process/next_tick.js:61:11)
                pi@raspberrypi:~ $ npm -v
                6.10.2
                pi@raspberrypi:~ $

                This is what happened when I did pm2 logs and npm -v. I am about to see what npm i -g npm will do

                1 Reply Last reply Reply Quote 0
                • G Offline
                  Gomalley @sdetweil
                  last edited by

                  @sdetweil
                  pi@raspberrypi:~ $ npm i -g npm
                  npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules/npm
                  npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
                  npm ERR! path /usr/local/lib/node_modules/npm
                  npm ERR! code EACCES
                  npm ERR! errno -13
                  npm ERR! syscall access
                  npm ERR! Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules/npm’
                  npm ERR! { [Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules/npm’]
                  npm ERR! stack:
                  npm ERR! ‘Error: EACCES: permission denied, access '/usr/local/lib/node_modules/npm'’,
                  npm ERR! errno: -13,
                  npm ERR! code: ‘EACCES’,
                  npm ERR! syscall: ‘access’,
                  npm ERR! path: ‘/usr/local/lib/node_modules/npm’ }
                  npm ERR!
                  npm ERR! The operation was rejected by your operating system.
                  npm ERR! It is likely you do not have the permissions to access this file as the current user
                  npm ERR!
                  npm ERR! If you believe this might be a permissions issue, please double-check the
                  npm ERR! permissions of the file and its containing directories, or try running
                  npm ERR! the command again as root/Administrator (though this is not recommended).

                  npm ERR! A complete log of this run can be found in:
                  npm ERR! /home/pi/.npm/_logs/2019-08-05T19_21_26_414Z-debug.log

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

                    @Gomalley go old sudo screws thing up again…

                    cd ~
                    sudo chown -R pi .
                    

                    Then try again…

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    G 1 Reply Last reply Reply Quote 0
                    • G Offline
                      Gomalley @sdetweil
                      last edited by

                      @sdetweil this is what happened when I typed in the command

                      pi@raspberrypi:~ $ sudo chown -R pi
                      chown: missing operand after ‘pi’
                      Try ‘chown --help’ for more information.

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

                        @Gomalley there was a dot at the end, it was important

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        G 1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 4
                        • 5
                        • 3 / 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