• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.

MagicMirror on Pi Zero W

Scheduled Pinned Locked Moved Tutorials
46 Posts 19 Posters 56.0k Views 21 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.
  • B Offline
    blueeyed1
    last edited by Apr 19, 2017, 8:18 PM

    I have same problem, too. Any idea of solution?

    1 Reply Last reply Reply Quote 0
    • H Offline
      Hawking
      last edited by Hawking Apr 19, 2017, 8:26 PM Apr 19, 2017, 8:22 PM

      @Iseknutz said in MagicMirror on Pi Zero W:

      Did you solve the problem? Maybe the other modules use any functions that the Pi Zero don’t understand…?

      No, I didn’t solve the problem yet.
      I found out that the working modules (helloworld and alert) don’t use the “moment” js library but the modules that result in a blank screen (calendar, clock, compliments, newsfeed and weatherforcast) do. As the error in my /var/log/daemon also contains “ReferenceError: Can’t find variable: moment” I think it is likely that something went wrong in installation of (the moment.js library of) node. And indeed, the installation with

      sudo npm install
      

      gave some warnings and errors in my case. As only the Pi Zeros seem to be concerned it must be something due to our “special” installation. The Pi Zero needs a special (ARM) node variant. The version one gets via

      sudo wget http://node-arm.herokuapp.com/node_latest_armhf.deb
      sudo dpkg -i node_latest_armhf.deb
      

      is quite old (version 4.2.1; the regular installer of MM2 updates nodes to version 6 if the version of node is below 5.1.0 and in an other thread somebody reported that version 7 is working for a regular Pi as well) However, I also tried to use version 6 and 7, but the result was still a blank screen.
      I also get this blank screen if I access the provided data via network using Firefox of a regular PC, so I think it is not related to some issues with the midori browser.

      But I’m not not at all an expert in this issue, so I might have done something wrong or it could be an other reason (the working modules are also in other ways simpler than the other ones). I would be happy if somebody could tell us how to solve this issue.

      S M 2 Replies Last reply Apr 20, 2017, 12:29 PM Reply Quote 0
      • S Offline
        strawberry 3.141 Project Sponsor Module Developer @Hawking
        last edited by Apr 20, 2017, 12:29 PM

        @Hawking you should check if moment weas installed properly it sits in the vendor directory in node_modules, if it isnt there run npm install in the vendor directory

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

        H 1 Reply Last reply Apr 20, 2017, 10:25 PM Reply Quote 0
        • M Offline
          Mitchfarino Module Developer @Hawking
          last edited by Apr 20, 2017, 12:40 PM

          @Hawking

          I saw errors stating that MM requires a higher version of node, but I couldn’t figure out how to do it.

          Could you provide the command you used? Then I’ll try it on mine too and will feed back

          1 Reply Last reply Reply Quote 0
          • M Offline
            McSorley
            last edited by Apr 20, 2017, 5:31 PM

            I am getting an issue with sudo npm install getting the following error.

            npm WARN cannot run in wd magicmirror@2.1.1 cd vendor && npm install (wd=/home/pi/MagicMirror)
            npm WARN cannot run in wd magicmirror@2.1.1 sh installers/postinstall/postinstall.sh (wd=/home/pi/MagicMirror)
            
            S 1 Reply Last reply Apr 20, 2017, 7:36 PM Reply Quote 0
            • S Offline
              strawberry 3.141 Project Sponsor Module Developer @McSorley
              last edited by Apr 20, 2017, 7:36 PM

              @McSorley try npm install --unsafe-perm

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

              1 Reply Last reply Reply Quote 0
              • M Offline
                Mitchfarino Module Developer
                last edited by Apr 20, 2017, 9:35 PM

                I think if someone can get this up and running, they should host the image somewhere for people to download.

                Don’t load any modules, just go with the default.

                Then people can install the ones that they need.

                1 Reply Last reply Reply Quote 0
                • H Offline
                  Hawking @strawberry 3.141
                  last edited by Hawking Apr 20, 2017, 10:27 PM Apr 20, 2017, 10:25 PM

                  @strawberry-3.141 said in MagicMirror on Pi Zero W:

                  @Hawking you should check if moment weas installed properly it sits in the vendor directory in node_modules, if it isnt there run npm install in the vendor directory

                  With “vendor directory” you refer to “~/MagicMirror”?
                  I have a folder
                  /home/pi/MagicMirror/node_modules/moment with several files (including moment.js) and subfolders. Is this enough indication for a proper installation or should I check other details?

                  @Mitchfarino said in MagicMirror on Pi Zero W:

                  @Hawking

                  I saw errors stating that MM requires a higher version of node, but I couldn’t figure out how to do it.

                  Could you provide the command you used? Then I’ll try it on mine too and will feed back

                  Yes, I got the same error/warnings, that’s why I tried to use a more recent version of node. I used the scripts available here
                  https://github.com/sdesalas/node-pi-zero
                  I tested it for v6 (don’t remember which subversion) and v7.7.1. Both was without success (no error/warning about old node version, instead other issues and finally still a blank screen). But maybe I made something wrong. Please try your self and let us know about the results (and post the error you get, I don’t remember them in detail).

                  @Mitchfarino said in MagicMirror on Pi Zero W:

                  I think if someone can get this up and running, they should host the image somewhere for people to download.

                  I would strongly prefer to know the commands that worked. An image is a huge file that gets outdated (replacement of jessie…), has to be stored on some external server (the free one are usually slow…) The commands on the other hand are hopefully only a small modification of the tutorial writen above, can easily be used and even adapted more easy.

                  S 1 Reply Last reply Apr 21, 2017, 8:08 AM Reply Quote 0
                  • S Offline
                    strawberry 3.141 Project Sponsor Module Developer @Hawking
                    last edited by Apr 21, 2017, 8:08 AM

                    @Hawking said in MagicMirror on Pi Zero W:

                    /home/pi/MagicMirror/node_modules/moment

                    it should look like this /home/pi/MagicMirror/vendor/node_modules/moment do you have a package.json file in /home/pi/MagicMirror/vendor?

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

                    1 Reply Last reply Reply Quote 1
                    • H Offline
                      Hawking
                      last edited by Apr 21, 2017, 9:53 PM

                      @strawberry-3.141 said in MagicMirror on Pi Zero W:

                      @Hawking said in MagicMirror on Pi Zero W:

                      /home/pi/MagicMirror/node_modules/moment

                      it should look like this /home/pi/MagicMirror/vendor/node_modules/moment do you have a package.json file in /home/pi/MagicMirror/vendor?

                      I have a directory /home/pi/MagicMirror/vendor containing
                      package.json and vendor.js but noting more.

                      I now used npn version 2.14.7 (checked by npm -version) to

                      cd ~/MagicMirror/vendor
                      npm install
                      

                      This gave

                      npm WARN package.json magicmirror-vendors@ No README data
                      font-awesome@4.7.0 node_modules/font-awesome
                      moment-timezone@0.5.13 node_modules/moment-timezone
                      weathericons@2.1.0 node_modules/weathericons
                      moment@2.18.1 node_modules/moment
                      

                      and the folder /home/pi/MagicMirror/vendor/node_modules/moment that you mentioned before was created.
                      I then rebootet (not sure if necessary) and it seems to work (I see the date and time, holidays,quote…). I’ll now set everything up but it looks way better then before.
                      So thanks a lot for your help!! I hope that your fix also works for the other people who have the same problem.

                      Just to understand the fix a bit better:
                      Is there a reason that one seem to have to do run
                      sudo npm install once in /home/pi/MagicMirror/ (this is already included in the initial post) and once npm install in /home/pi/MagicMirror/vendor/? (this is not mentioned in the initial post and also not directly done by the standard installer (that does not work for the pi-Zero) located in /home/pi/MagicMirror/installers/raspberry.sh (at least I don’t see it therein).

                      S 1 Reply Last reply Apr 22, 2017, 8:43 AM Reply Quote 1
                      • 1
                      • 2
                      • 3
                      • 4
                      • 5
                      • 2 / 5
                      2 / 5
                      • First post
                        12/46
                        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