Read the statement by Michael Teeuw here.
Can't install MMM-Navigate
-
Hello,
Im trying to install the MMM-Navigate module made by @AxLed.
When runningnpm 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 -
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 -
-
@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
-
I tried to start my Mirror in server mode and than i got this error:
[17.03.2021 20:17.36.506] [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 76. This version of Node.js requires NODE_MODULE_VERSION 83. Please try re-compiling or re-installing the module (for instance, using `npm rebuild` or `npm install`). [17.03.2021 20:17.36.508] [LOG] Loading module helpers ... [17.03.2021 20:17.36.509] [LOG] No helper found for module: alert. [17.03.2021 20:17.36.510] [LOG] Initializing new module helper ... [17.03.2021 20:17.36.510] [LOG] Module helper loaded: updatenotification [17.03.2021 20:17.36.511] [LOG] No helper found for module: clock. [17.03.2021 20:17.36.517] [ERROR] Whoops! There was an uncaught exception... [17.03.2021 20:17.36.522] [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 76. This version of Node.js requires NODE_MODULE_VERSION 83. Please try re-compiling or re-installing the module (for instance, using `npm rebuild` or `npm install`). at Object.Module._extensions..node (internal/modules/cjs/loader.js:1122:18) at Module.load (internal/modules/cjs/loader.js:928:32) at Function.Module._load (internal/modules/cjs/loader.js:769:14) at Module.require (internal/modules/cjs/loader.js:952:19) at require (internal/modules/cjs/helpers.js:88: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 at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-Navigate/node_modules/epoll/epoll.js:15:3) at Module._compile (internal/modules/cjs/loader.js:1063:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) [17.03.2021 20:17.36.525] [ERROR] MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection? [17.03.2021 20:17.36.526] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
in “non-server-mode” it works very well.
i reinstalled the module , npm, node.js, electron, but it still doesn’t work
Any idea?
-
@matze86 right. the library epoll is compiled for electron, but not just node. (server mode)
per the messages, I would try npm rebuild
-
npm rebuild failed:
pi@raspberrypi:~/MagicMirror/modules/MMM-Navigate $ npm rebuild npm ERR! code 1 npm ERR! path /home/pi/MagicMirror/modules/MMM-Navigate/node_modules/epoll npm ERR! command failed npm ERR! command sh -c node-gyp rebuild npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@7.1.2 npm ERR! gyp info using node@14.16.0 | linux | arm npm ERR! gyp info find Python using Python version 3.7.3 found at "/usr/bin/python3" npm ERR! gyp info spawn /usr/bin/python3 npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args '/home/pi/MagicMirror/modules/MMM-Navigate/node_modules/node-gyp/gyp/gyp_main.py', npm ERR! gyp info spawn args 'binding.gyp', npm ERR! gyp info spawn args '-f', npm ERR! gyp info spawn args 'make', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/home/pi/MagicMirror/modules/MMM-Navigate/node_modules/epoll/build/config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/home/pi/MagicMirror/modules/MMM-Navigate/node_modules/node-gyp/addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/home/pi/.cache/node-gyp/14.16.0/include/node/common.gypi', npm ERR! gyp info spawn args '-Dlibrary=shared_library', npm ERR! gyp info spawn args '-Dvisibility=default', npm ERR! gyp info spawn args '-Dnode_root_dir=/home/pi/.cache/node-gyp/14.16.0', npm ERR! gyp info spawn args '-Dnode_gyp_dir=/home/pi/MagicMirror/modules/MMM-Navigate/node_modules/node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=/home/pi/.cache/node-gyp/14.16.0/<(target_arch)/node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=/home/pi/MagicMirror/modules/MMM-Navigate/node_modules/epoll', npm ERR! gyp info spawn args '-Dnode_engine=v8', npm ERR! gyp info spawn args '--depth=.', npm ERR! gyp info spawn args '--no-parallel', npm ERR! gyp info spawn args '--generator-output', npm ERR! gyp info spawn args 'build', npm ERR! gyp info spawn args '-Goutput_dir=.' npm ERR! gyp info spawn args ] npm ERR! gyp ERR! build error npm ERR! gyp ERR! stack Error: You must run `node-gyp configure` first! npm ERR! gyp ERR! stack at ReadFileContext.<anonymous> (/home/pi/MagicMirror/modules/MMM-Navigate/node_modules/node-gyp/lib/build.js:43:20) npm ERR! gyp ERR! stack at ReadFileContext.callback (/home/pi/MagicMirror/modules/MMM-Navigate/node_modules/graceful-fs/graceful-fs.js:123:16) npm ERR! gyp ERR! stack at FSReqCallback.readFileAfterOpen [as oncomplete] (fs.js:273:13) npm ERR! gyp ERR! System Linux 5.10.11-v7l+ npm ERR! gyp ERR! command "/usr/local/bin/node" "/home/pi/MagicMirror/modules/MMM-Navigate/node_modules/.bin/node-gyp" "rebuild" npm ERR! gyp ERR! cwd /home/pi/MagicMirror/modules/MMM-Navigate/node_modules/epoll npm ERR! gyp ERR! node -v v14.16.0 npm ERR! gyp ERR! node-gyp -v v7.1.2 npm ERR! gyp ERR! not ok npm ERR! A complete log of this run can be found in: npm ERR! /home/pi/.npm/_logs/2021-03-17T21_03_25_216Z-debug.log
i tried with npm install (a second time), but this doesn’t change anything