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

MMM-Buttons update node error installed 48 need 57



  • I recently updated my MagicMirror to the most recent version using

    git pull && npm install
    

    after a long 10 minutes due to 1 year worth of never updating. I did a

    sudo reboot
    

    and was welcomed to a black screen. So i dug through the logs

    pi@Magic_Mirror:~/MagicMirror $ pm2 show 0
     Describing process with id 0 - name MagicMirror
    ┌───────────────────┬────────────────────────────────────────────┐
    │ status            │ online                                     │
    │ name              │ MagicMirror                                │
    │ restarts          │ 0                                          │
    │ uptime            │ 21m                                        │
    │ script path       │ /home/pi/MagicMirror/installers/mm.sh      │
    │ script args       │ N/A                                        │
    │ error log path    │ /home/pi/.pm2/logs/MagicMirror-error-0.log │
    │ out log path      │ /home/pi/.pm2/logs/MagicMirror-out-0.log   │
    │ pid path          │ /home/pi/.pm2/pids/MagicMirror-0.pid       │
    │ interpreter       │ bash                                       │
    │ interpreter args  │ N/A                                        │
    │ script id         │ 0                                          │
    │ exec cwd          │ /home/pi/MagicMirror                       │
    │ exec mode         │ fork_mode                                  │
    │ node.js version   │ N/A                                        │
    │ watch & reload    │ ✔                                          │
    │ unstable restarts │ 0                                          │
    │ created at        │ 2018-02-20T06:18:41.419Z                   │
    └───────────────────┴────────────────────────────────────────────┘
     Revision control metadata
    ┌──────────────────┬────────────────────────────────────────────────┐
    │ revision control │ git                                            │
    │ remote url       │ https://github.com/MichMich/MagicMirror.git    │
    │ repository root  │ /home/pi/MagicMirror                           │
    │ last update      │ 2018-08-12T18:38:47.286Z                       │
    │ revision         │ 6aa156d95667b230264fd99c5df877b25759e710       │
    │ comment          │ Merge pull request #1343 from MichMich/develop │
    │ branch           │ master                                         │
    └──────────────────┴────────────────────────────────────────────────┘
     Add your own code metrics: http://bit.ly/code-metrics
     Use `pm2 logs MagicMirror [--lines 1000]` to display logs
     Use `pm2 monit` to monitor CPU and Memory usage MagicMirror
    pi@Magic_Mirror:~/MagicMirror $ pm2 logs MagicMirror
    [TAILING] Tailing last 15 lines for [MagicMirror] process (change the value with --lines option)
    /home/pi/.pm2/logs/MagicMirror-error-0.log last 15 lines:
    0|MagicMir | Error: The module '/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll/build/Release/epoll.node'
    0|MagicMir | was compiled against a different Node.js version using
    0|MagicMir | NODE_MODULE_VERSION 50. This version of Node.js requires
    0|MagicMir | NODE_MODULE_VERSION 57. Please try re-compiling or re-installing
    0|MagicMir | the module (for instance, using `npm rebuild` or `npm install`).
    0|MagicMir |     at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:173:20)
    0|MagicMir |     at Object.Module._extensions..node (module.js:671:18)
    0|MagicMir |     at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:173:20)
    0|MagicMir |     at Module.load (module.js:561:32)
    0|MagicMir |     at tryModuleLoad (module.js:504:12)
    0|MagicMir |     at Function.Module._load (module.js:496:3)
    0|MagicMir |     at Module.require (module.js:586:17)
    0|MagicMir |     at require (internal/module.js:11:18)
    0|MagicMir |     at bindings (/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/bindings/bindings.js:81:44)
    0|MagicMir |     at Object. (/home/pi/MagicMirror/modules/MMM-Buttons/node_modules/epoll/epoll.js:1:192)
    
    /home/pi/.pm2/logs/MagicMirror-out-0.log last 15 lines:
    0|MagicMir |
    0|MagicMir | Starting MagicMirror: v2.4.1
    0|MagicMir | Loading config ...
    0|MagicMir | Loading module helpers ...
    0|MagicMir | No helper found for module: MMM-ModuleToggle.
    0|MagicMir | Initializing new module helper ...
    0|MagicMir | Module helper loaded: MMM-DropboxWallpaper
    0|MagicMir | Loading module helpers ...
    0|MagicMir | No helper found for module: MMM-ModuleToggle.
    0|MagicMir | Initializing new module helper ...
    0|MagicMir | Module helper loaded: MMM-DropboxWallpaper
    0|MagicMir | Whoops! There was an uncaught exception...
    0|MagicMir | MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
    0|MagicMir | If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
    0|MagicMir | Launching application.
    
    ^X^C
    

    I went ahead and did what it suggested with the npm rebuild and just lowered the node error to 48 instead of 50.

    I’m confused as to what this means and how to fix this, since before the update it was working.

    (MMM-Buttons is used to swap between modules,
    1- Blank screen only background
    2-Calendar (custom sized)
    3-Weather (custom sized)
    4-Wunderlist (custom sized))


  • Module Developer

    @glitchgod
    I had the same problem, here is the solution which worked for me.

    Change into the modules directory

    cd MagicMirror/modules/MMM-Buttons
    

    Rebuild module for the correct elecron version

    npm rebuild --runtime=electron --target=$(../../node_modules/electron/cli.js --version) --disturl=https://atom.io/download/atom-shell --build-from-source
    

    AxLED