MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. l1613532
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    L
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 0
    • Posts 6
    • Groups 0

    l1613532

    @l1613532

    0
    Reputation
    492
    Profile views
    6
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    l1613532 Unfollow Follow

    Latest posts made by l1613532

    • RE: Compliments not displaying

      Found the answer! Thank you to @strawberry-3-141 for pointing me in the right direction.

      in the compliments.js file (found in /MagicMirror/modules/default/compliments folder), change:

      	if (this.config.remoteFile != null) {
      		this.complimentFile((response) => {
      			this.config.compliments = JSON.parse(response);
      		});
      	}
      

      to:

               if (this.config.remoteFile != null) {
                      this.complimentFile(
                              function(response){
                                      this.config.compliments = JSON.parse(response);
                      });
              }
      

      For all those using Midori browser (which appears to be the only browser which runs MM2 on Pi Zero), this will be an ongoing problem for certain modules that use es6 arrow functions. See https://github.com/MichMich/MagicMirror/issues/694 for more info.

      posted in Development
      L
      l1613532
    • RE: Compliments not displaying

      @strawberry-3.141 said in Compliments not displaying:

      es6 arrow function

      Can you describe this es6 arrow function at the start of compliments.js and what I can manually replace it with that will be supported by Midori?

      posted in Development
      L
      l1613532
    • RE: Compliments not displaying

      and we are both running jesse lite

      posted in Development
      L
      l1613532
    • RE: Compliments not displaying

      Probably not a coincidence, but both @jin and I are using raspberry pi zero ‘W’ with midori as our browser.

      posted in Development
      L
      l1613532
    • RE: Compliments not displaying

      @strawberry-3.141
      This is the log file when I run: npm start dev

      0 info it worked if it ends with ok
      1 verbose cli [ ‘/usr/local/bin/node’, ‘/usr/local/bin/npm’, ‘start’, ‘dev’ ]
      2 info using npm@2.14.7
      3 info using node@v4.2.1
      4 verbose run-script [ ‘prestart’, ‘start’, ‘poststart’ ]
      5 info prestart magicmirror@2.1.0
      6 info start magicmirror@2.1.0
      7 verbose unsafe-perm in lifecycle true
      8 info magicmirror@2.1.0 Failed to exec start script
      9 verbose stack Error: magicmirror@2.1.0 start: electron js/electron.js "dev"
      9 verbose stack spawn ENOENT
      9 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:17:16)
      9 verbose stack at emitTwo (events.js:87:13)
      9 verbose stack at ChildProcess.emit (events.js:172:7)
      9 verbose stack at maybeClose (internal/child_process.js:818:16)
      9 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
      10 verbose pkgid magicmirror@2.1.0
      11 verbose cwd /home/pi/MagicMirror
      12 error Linux 4.4.50+
      13 error argv “/usr/local/bin/node” “/usr/local/bin/npm” “start” “dev”
      14 error node v4.2.1
      15 error npm v2.14.7
      16 error file sh
      17 error code ELIFECYCLE
      18 error errno ENOENT
      19 error syscall spawn
      20 error magicmirror@2.1.0 start: electron js/electron.js "dev"
      20 error spawn ENOENT
      21 error Failed at the magicmirror@2.1.0 start script ‘electron js/electron.js “dev”’.
      21 error This is most likely a problem with the magicmirror package,
      21 error not with npm itself.
      21 error Tell the author that this fails on your system:
      21 error electron js/electron.js “dev”
      21 error You can get their info via:
      21 error npm owner ls magicmirror
      21 error There is likely additional logging output above.
      22 verbose exit [ 1, true ]

      sorry, I’m also new to programming. Any ideas for next step?

      posted in Development
      L
      l1613532
    • RE: Compliments not displaying

      Compliments not working for me either. On Raspberry Pi Zero W running Jesse Lite. Used Wieber’s guide to get it running (https://forum.magicmirror.builders/topic/1183/how-i-got-my-magic-mirror-working-on-a-raspberry-pi-0-zero).

      By default 'compliments" file does not output to the MM although all other default modules working.
      @cowboysdude : the default config.js is set up the way you described and it still does not work.

      Also edited config.js to place config: { compliments… and manually install compliments similar to what @jin has done but still no output on the MM.

      No errors or crashes and the later modules after compliments still work.

      posted in Development
      L
      l1613532