Read the statement by Michael Teeuw here.
MagicMirror² v2.12.0 & MMM-DHT-Sensor (temperatur & humidity)
-
Hi there,
after updating my Magic Mirror to the latest version, the Modul “MMM-DHT-Sensor” won’t work anymore.
In fact, the MagicMirror “crashes” with a black screen while loading it:[2020-08-02 17:45:35.380] [ERROR] App threw an error during load [2020-08-02 17:45:35.384] [ERROR] Error: The module '/home/pi/MagicMirror/modules/MMM-DHT-Sensor/node_modules/node-dht-sensor/build/Release/node_dht_sensor.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 64. This version of Node.js requires NODE_MODULE_VERSION 73. Please try re-compiling or re-installing the module (for instance, using `npm rebuild` or `npm install`). at process.func (electron/js2c/asar.js:138:31) at process.func [as dlopen] (electron/js2c/asar.js:138:31) at Object.Module._extensions..node (internal/modules/cjs/loader.js:828:18) at Object.func (electron/js2c/asar.js:138:31) at Object.func [as .node] (electron/js2c/asar.js:138:31) at Module.load (internal/modules/cjs/loader.js:645:32) at Function.Module._load (internal/modules/cjs/loader.js:560:12) at Module.require (internal/modules/cjs/loader.js:685:19) at require (internal/modules/cjs/helpers.js:16:16) at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-DHT-Sensor/node_helper.js:11:16) [2020-08-02 17:45:35.394] [ERROR] Whoops! There was an uncaught exception... [2020-08-02 17:45:35.397] [ERROR] Error: The module '/home/pi/MagicMirror/modules/MMM-DHT-Sensor/node_modules/node-dht-sensor/build/Release/node_dht_sensor.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 64. This version of Node.js requires NODE_MODULE_VERSION 73. Please try re-compiling or re-installing the module (for instance, using `npm rebuild` or `npm install`). at process.func (electron/js2c/asar.js:138:31) at process.func [as dlopen] (electron/js2c/asar.js:138:31) at Object.Module._extensions..node (internal/modules/cjs/loader.js:828:18) at Object.func (electron/js2c/asar.js:138:31) at Object.func [as .node] (electron/js2c/asar.js:138:31) at Module.load (internal/modules/cjs/loader.js:645:32) at Function.Module._load (internal/modules/cjs/loader.js:560:12) at Module.require (internal/modules/cjs/loader.js:685:19) at require (internal/modules/cjs/helpers.js:16:16) at Object.<anonymous> (/home/pi/MagicMirror/modules/MMM-DHT-Sensor/node_helper.js:11:16) [2020-08-02 17:45:35.414] [ERROR] MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection? [2020-08-02 17:45:35.415] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues Fontconfig warning: "/etc/fonts/fonts.conf", line 100: unknown element "blank" [2020-08-02 17:45:35.722] [LOG] Launching application.
I already tried a
npm rebuild npm install
with no luck…
Right now, i am dumping my Mirror with dd to my NAS - maybe someone here can has experienced this error as well, or is using another Module, which he/she could recommend.
thank you all
stefan
-
@Stef do
cd ~/MagicMirror npm install electron-rebuild --save node node_modules/.bin/electron-rebuild
-
@sdetweil
Remembered that
Did that
Did not work
Still the same error message… -
@Stef asked friend to look at this too. we have been discussing right way to fix. so hang on
-
@Stef ok, let’s try this
cd~/MagicMirror/modules cd MMM-DHT-Sensor npm i electron-rebuild node node_modules/.bin/electron-rebuild
-
note:
Don’t donpm fix
npm audit fix
npm rebuild
or other command like @sdetweil says
otherwise you will have the same error ! -
@sdetweil thanks a million for your effort… unfortunatley, the last command gives me back a bunch of errors… even with sudo…
i ran it for a third time and got this:
pi@mirrorpi:~/MagicMirror/modules/MMM-DHT-Sensor $ node node_modules/.bin/electron-rebuild ✖ Rebuild Failed An unhandled error occurred inside electron-rebuild gyp info it worked if it ends with ok gyp info using node-gyp@6.1.0 gyp info using node@12.14.0 | linux | arm gyp ERR! clean error gyp ERR! stack Error: EACCES: permission denied, unlink 'build/Makefile' gyp ERR! System Linux 4.19.66-v7+ gyp ERR! command "/usr/local/bin/node" "/home/pi/MagicMirror/modules/MMM-DHT-Sensor/node_modules/.bin/node-gyp" "rebuild" "--target=6.1.7" "--arch=arm" "--dist-url=https://www.electronjs.org/headers" "--build-from-source" gyp ERR! cwd /home/pi/MagicMirror/modules/MMM-DHT-Sensor/node_modules/node-dht-sensor gyp ERR! node -v v12.14.0 gyp ERR! node-gyp -v v6.1.0 gyp ERR! not ok Failed with exit code: 1 Error: gyp info it worked if it ends with ok gyp info using node-gyp@6.1.0 gyp info using node@12.14.0 | linux | arm gyp ERR! clean error gyp ERR! stack Error: EACCES: permission denied, unlink 'build/Makefile' gyp ERR! System Linux 4.19.66-v7+ gyp ERR! command "/usr/local/bin/node" "/home/pi/MagicMirror/modules/MMM-DHT-Sensor/node_modules/.bin/node-gyp" "rebuild" "--target=6.1.7" "--arch=arm" "--dist-url=https://www.electronjs.org/headers" "--build-from-source" gyp ERR! cwd /home/pi/MagicMirror/modules/MMM-DHT-Sensor/node_modules/node-dht-sensor gyp ERR! node -v v12.14.0 gyp ERR! node-gyp -v v6.1.0 gyp ERR! not ok Failed with exit code: 1 at SafeSubscriber._error (/home/pi/MagicMirror/modules/MMM-DHT-Sensor/node_modules/spawn-rx/lib/src/index.js:267:84) at SafeSubscriber.__tryOrUnsub (/home/pi/MagicMirror/modules/MMM-DHT-Sensor/node_modules/rxjs/internal/Subscriber.js:205:16) at SafeSubscriber.error (/home/pi/MagicMirror/modules/MMM-DHT-Sensor/node_modules/rxjs/internal/Subscriber.js:156:26) at Subscriber._error (/home/pi/MagicMirror/modules/MMM-DHT-Sensor/node_modules/rxjs/internal/Subscriber.js:92:26) at Subscriber.error (/home/pi/MagicMirror/modules/MMM-DHT-Sensor/node_modules/rxjs/internal/Subscriber.js:72:18) at MapSubscriber.Subscriber._error (/home/pi/MagicMirror/modules/MMM-DHT-Sensor/node_modules/rxjs/internal/Subscriber.js:92:26) at MapSubscriber.Subscriber.error (/home/pi/MagicMirror/modules/MMM-DHT-Sensor/node_modules/rxjs/internal/Subscriber.js:72:18) at SafeSubscriber._next (/home/pi/MagicMirror/modules/MMM-DHT-Sensor/node_modules/spawn-rx/lib/src/index.js:242:65) at SafeSubscriber.__tryOrUnsub (/home/pi/MagicMirror/modules/MMM-DHT-Sensor/node_modules/rxjs/internal/Subscriber.js:205:16) at SafeSubscriber.next (/home/pi/MagicMirror/modules/MMM-DHT-Sensor/node_modules/rxjs/internal/Subscriber.js:143:22)
@Bugsounet which command should i run?
-
@Stef cause I used sudo, some stuff is now connected to root user
from the module folder
dosudo chown -R pi * sudo chown -R pi *.*
and rerun the electron rebuild
show us the errors -
-
@Stef fun
another try
from the module folderrm -rf node_modules rm package-lock.json npm install nan npm install