MagicMirror² v2.13.0 is available! For more information about this release, check out this topic.

Magic Mirror won't load.

  • I can’t get the Magic Mirror to load. I went to the .pm2/logs/mm-error.log and this is what I got:

    /home/pi/MagicMirror/node_modules/electron/dist/electron js/electron.js: symbol lookup error: /home/pi/MagicMirror/modules/MMM-PIR/node_modules/epoll/build/Release/epoll.node: undefined symbol: _ZN2v816FunctionTemplate3NewEPNS_7IsolateEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEENS_5LocalIS4_EENSA_INS_9SignatureEEEiNS_19ConstructorBehaviorENS_14SideEffectTypeE
    npm ERR! file sh
    npm ERR! code ELIFECYCLE
    npm ERR! errno ENOENT
    npm ERR! syscall spawn
    npm ERR! magicmirror@2.8.0 start: `sh`
    npm ERR! spawn ENOENT
    npm ERR! 
    npm ERR! Failed at the magicmirror@2.8.0 start script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /home/pi/.npm/_logs/2019-09-04T00_37_51_281Z-debug.log

    The code above is repeated many more times but I only listed the one time for brevity.

    I then went to the .npm/_logs/2009-09-04T00_50_58_410Z-debug.log and this is what was there:

    0 info it worked if it ends with ok
    1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ]
    2 info using npm@6.9.0
    3 info using node@v10.16.3
    4 verbose run-script [ 'prestart', 'start', 'poststart' ]
    5 info lifecycle magicmirror@2.8.0~prestart: magicmirror@2.8.0
    6 info lifecycle magicmirror@2.8.0~start: magicmirror@2.8.0
    7 verbose lifecycle magicmirror@2.8.0~start: unsafe-perm in lifecycle true
    8 verbose lifecycle magicmirror@2.8.0~start: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/pi/MagicMirror/node_modules/.bin:/home/pi/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
    9 verbose lifecycle magicmirror@2.8.0~start: CWD: /home/pi/MagicMirror
    10 silly lifecycle magicmirror@2.8.0~start: Args: [ '-c', 'sh' ]
    11 info lifecycle magicmirror@2.8.0~start: Failed to exec start script
    12 verbose stack Error: magicmirror@2.8.0 start: `sh`
    12 verbose stack spawn ENOENT
    12 verbose stack     at ChildProcess. (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
    12 verbose stack     at ChildProcess.emit (events.js:198:13)
    12 verbose stack     at maybeClose (internal/child_process.js:982:16)
    12 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
    13 verbose pkgid magicmirror@2.8.0
    14 verbose cwd /home/pi/MagicMirror
    15 verbose Linux 4.19.66-v7+
    16 verbose argv "/usr/bin/node" "/usr/bin/npm" "start"
    17 verbose node v10.16.3
    18 verbose npm  v6.9.0
    19 error file sh
    20 error code ELIFECYCLE
    21 error errno ENOENT
    22 error syscall spawn
    23 error magicmirror@2.8.0 start: `sh`
    23 error spawn ENOENT
    24 error Failed at the magicmirror@2.8.0 start script.
    24 error This is probably not a problem with npm. There is likely additional logging output above.
    25 verbose exit [ 1, true ]

    I don’t really understand what anyof that means. What is causing the problem?

  • @aunrea looks like you might have done an update, but not completely.

    in each module folder that has a package.json file, do

    npm install

  • @sdetweil I had done it before, I believed. I did it again and I still get the same error and the same message.

  • @aunrea mmm-pir is missing completion

  • @sdetweil I uninstalled MMM-PIR and reinstall. I have updated npm. I still get that same error message when I have MMM-PIR in my config.js file.

  • @aunrea when u do

    cd ~/MagicMirror/modules/MMM-PIR
    npm install

    What happens?

  • @sdetweil I get the message:

    audited 6 packages in 1.756s
    found 0 vulnerabilities

  • @aunrea I think u need to do an electron-rebuild in that folder.

    I am not near my machine, but electron-rebuild was installed as part of MagicMirror.


  • @sdetweil I got the following error when I followed those instructions:

    pi@raspberrypi:~/MagicMirror/modules/MMM-PIR $ npm install electron-rebuild
    + electron-rebuild@1.8.6
    updated 1 package and audited 245 packages in 20.05s
    found 0 vulnerabilities
    pi@raspberrypi:~/MagicMirror/modules/MMM-PIR $ node_modules/.bin/electron-rebuild
    ✖ Rebuild Failed
    An unhandled error occurred inside electron-rebuild
    Could not locate node-gyp
    Error: Could not locate node-gyp
        at Rebuilder. (/home/pi/MagicMirror/modules/MMM-PIR/node_modules/electron-rebuild/lib/src/rebuild.js:172:23)
        at ()
        at fulfilled (/home/pi/MagicMirror/modules/MMM-PIR/node_modules/electron-rebuild/lib/src/rebuild.js:4:58)

  • @aunrea see the instructions w MMM-AssistantMk2.

    Great step by step

Log in to reply