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

Can't install MMM-Navigate



  • Hello,

    Im trying to install the MMM-Navigate module made by @AxLed.
    When running

    npm install
    

    following message return:

    pi@raspberrypi:~/MagicMirror/modules/MMM-Navigate $ npm install
    
    > MagicMirror-Module-Navigate@1.4.0 install /home/pi/MagicMirror/modules/MMM-Navigate
    > electron-rebuild
    
    /home/pi/MagicMirror/modules/MMM-Navigate/node_modules/fs-extra/lib/mkdirs/make-dir.js:85
          } catch {
                  ^
    
    SyntaxError: Unexpected token {
        at new Script (vm.js:51:7)
        at createScript (vm.js:136:10)
        at Object.runInThisContext (vm.js:197:10)
        at Module._compile (internal/modules/cjs/loader.js:618:28)
        at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
        at Module.load (internal/modules/cjs/loader.js:566:32)
        at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
        at Function.Module._load (internal/modules/cjs/loader.js:498:3)
        at Module.require (internal/modules/cjs/loader.js:598:17)
        at require (internal/modules/cjs/helpers.js:11:18)
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! MagicMirror-Module-Navigate@1.4.0 install: `electron-rebuild`
    npm ERR! Exit status 1
    npm ERR! 
    npm ERR! Failed at the MagicMirror-Module-Navigate@1.4.0 install 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/2021-01-03T17_47_54_887Z-debug.log
    

    When i start the MagicMirror following error in in console:

    [03.01.2021 18:56.24.542] [LOG]   Module helper loaded: MMM-Page-Selector
    [03.01.2021 18:56.24.602] [ERROR] WARNING! Could not load config file. Starting with default configuration. Error found: Error: The module '/home/pi/MagicMirror/modules/MMM-Navigate/node_modules/epoll/build/Release/epoll.node'
    was compiled against a different Node.js version using
    NODE_MODULE_VERSION 59. This version of Node.js requires
    NODE_MODULE_VERSION 76. Please try re-compiling or re-installing
    the module (for instance, using `npm rebuild` or `npm install`).
    
    [03.01.2021 18:56.24.622] [ERROR] App threw an error during load
    [03.01.2021 18:56.24.626] [ERROR] Error: The module '/home/pi/MagicMirror/modules/MMM-Navigate/node_modules/epoll/build/Release/epoll.node'
    was compiled against a different Node.js version using
    NODE_MODULE_VERSION 59. This version of Node.js requires
    NODE_MODULE_VERSION 76. Please try re-compiling or re-installing
    the module (for instance, using `npm rebuild` or `npm install`).
        at process.func [as dlopen] (electron/js2c/asar.js:140:31)
        at Object.Module._extensions..node (internal/modules/cjs/loader.js:1016:18)
        at Object.func [as .node] (electron/js2c/asar.js:140:31)
        at Module.load (internal/modules/cjs/loader.js:816:32)
        at Module._load (internal/modules/cjs/loader.js:728:14)
        at Function.Module._load (electron/js2c/asar.js:748:26)
        at Module.require (internal/modules/cjs/loader.js:853:19)
        at require (internal/modules/cjs/helpers.js:74:18)
        at bindings (/home/pi/MagicMirror/modules/MMM-Navigate/node_modules/bindings/bindings.js:112:48)
        at /home/pi/MagicMirror/modules/MMM-Navigate/node_modules/epoll/epoll.js:7:31
    [03.01.2021 18:56.24.630] [ERROR] Whoops! There was an uncaught exception...
    [03.01.2021 18:56.24.638] [ERROR] Error: The module '/home/pi/MagicMirror/modules/MMM-Navigate/node_modules/epoll/build/Release/epoll.node'
    was compiled against a different Node.js version using
    NODE_MODULE_VERSION 59. This version of Node.js requires
    NODE_MODULE_VERSION 76. Please try re-compiling or re-installing
    the module (for instance, using `npm rebuild` or `npm install`).
        at process.func [as dlopen] (electron/js2c/asar.js:140:31)
        at Object.Module._extensions..node (internal/modules/cjs/loader.js:1016:18)
        at Object.func [as .node] (electron/js2c/asar.js:140:31)
        at Module.load (internal/modules/cjs/loader.js:816:32)
        at Module._load (internal/modules/cjs/loader.js:728:14)
        at Function.Module._load (electron/js2c/asar.js:748:26)
        at Module.require (internal/modules/cjs/loader.js:853:19)
        at require (internal/modules/cjs/helpers.js:74:18)
        at bindings (/home/pi/MagicMirror/modules/MMM-Navigate/node_modules/bindings/bindings.js:112:48)
        at /home/pi/MagicMirror/modules/MMM-Navigate/node_modules/epoll/epoll.js:7:31
    

    Can someone imagine whats the problem?

    Thanks in advance 🙂



  • @keineAhnung123 show results of

    node -v
    npm -v



  • @sdetweil

    pi@raspberrypi:~ $ node -v
    v9.11.2
    pi@raspberrypi:~ $ npm -v
    6.14.10
    

    node seems to be outdated?
    I will try to update it



  • @sdetweil

    sudo apt remove nodejs
    sudo apt install nodejs
    

    still Version 9.11.2 😞



  • @keineAhnung123 install nvm, and then use nvm to install node 10.23

    https://www.sitepoint.com/quick-tip-multiple-versions-node-nvm/



  • @sdetweil
    Thank you, that worked.
    Is there a reason why 10.23 and not the newest 14.15.3 or 15.0?



  • @keineAhnung123 cause we haven’t tested w those levels yet


Log in to reply