mboskamp / MMM-PIR

This MagicMirror module monitors a PIR sensor and turns on/off your display. You can even run custom scripts and control it via Telegram.
16 stars 6 forks source link

MMM-PIR doesn't work with NODE_MODULE_VERSION 73 #22

Open ghost opened 4 years ago

ghost commented 4 years ago

Hello, Can you updated this module because I imposible to install it because the Node.js version is not up to date. I have NODE_MODULE_VERSION 73. and NODE_MODULE_VERSION 64. This version of Node.js requires. this my pm2 logs after [Electron] displayed on my screen : 0|mm | [2020-08-22 09:47:51.986] [ERROR] WARNING! Could not load config file. Starting with default configuration. Error found: Error: The module '/home/pi/MagicMirror/modules/MMM-PIR/node_modules/epoll/build/Release/epoll.node' 0|mm | was compiled against a different Node.js version using 0|mm | NODE_MODULE_VERSION 64. This version of Node.js requires 0|mm | NODE_MODULE_VERSION 73. Please try re-compiling or re-installing 0|mm | the module (for instance, usingnpm rebuildornpm install).

Thanks you

AndBuettner commented 4 years ago

same here

majurgens commented 4 years ago

same here

davidoesch commented 4 years ago

I solved this problem using the command below:

./node_modules/.bin/electron-rebuild Steps:

If you have not installed electron-rebuild just install it with the command: npm i -D electron-rebuild Remove from the node-modules folder the serialport and @serialport folders. Remove the file packages-lock.json Run npm i to install non-installed modules And finally run ./node_modules/.bin/electron-rebuild It is very important to run ./node_modules/.bin/electron-rebuild directly after npm i.

Source: https://stackoverflow.com/a/52796884