MMM-PIR-Sensor icon indicating copy to clipboard operation
MMM-PIR-Sensor copied to clipboard

epoll compiled for the wrong version of Node?

Open jwu910 opened this issue 7 years ago • 7 comments

Hi, i've tried reinstallng and rebuilding epoll, with no success. Has anyone else run in to this issue? Seems like the only problem i'm running in to.

Thanks!

Error: The module '/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/epoll/build/Release/epoll.node' 0|mm | was compiled against a different Node.js version using 0|mm | NODE_MODULE_VERSION 48. This version of Node.js requires 0|mm | NODE_MODULE_VERSION 53. Please try re-compiling or re-installing 0|mm | the module (for instance, using npm rebuild ornpm install). 0|mm | at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:173:20) 0|mm | at Object.Module._extensions..node (module.js:598:18) 0|mm | at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:173:20) 0|mm | at Module.load (module.js:488:32) 0|mm | at tryModuleLoad (module.js:447:12) 0|mm | at Function.Module._load (module.js:439:3) 0|mm | at Module.require (module.js:498:17) 0|mm | at require (internal/module.js:20:19) 0|mm | at bindings (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/bindings/bindings.js:76:44) 0|mm | at Object. (/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/epoll/epoll.js:1:192)

jwu910 avatar Apr 12 '17 01:04 jwu910

I may have found a solution. Looked up options to try and use an older version of node and came across instructions to run

sudo npm install --save-dev electron-rebuild ./node_modules/.bin/electron-rebuild

This got rid of the error message and now I'm working through getting this up.

Edit: This got the module working. The mirror is up and running and the display shuts off after my delay timer now! This issue can be closed.

jwu910 avatar Apr 13 '17 08:04 jwu910

Same issue, but didn't get rid of the error by the description above

Wippo0 avatar Apr 17 '17 12:04 Wippo0

same issue for me. @jwu910 solution didn't work for me either.

WARNING! Could not load config file. Starting with default configuration. Error found: Error: The module '/home/pi/MagicMirror/modules/MMM-PIR-Sensor/node_modules/epoll/build/Release/epoll.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 51. This version of Node.js requires
NODE_MODULE_VERSION 53. Please try re-compiling or re-installing

haelbichalex avatar Apr 25 '17 18:04 haelbichalex

@haelbichalex @Wippo0 I looked a lot in to epoll and tried uninstalling and reinstalling it.

I think i tired npm uninstall epoll, as well as npm uninstall electron and went forward again with the rebuild with the --save tag

jwu910 avatar Apr 28 '17 06:04 jwu910

Any additional hints? Have re-installed my RPi2B from scratch and followed the most basic instructions for getting MM with MMM-Button working - and still ran into the issue described here again.

Edit - adding some version info OS: Raspian Jessie 2017-04-10 (+apt-get upgrade) node: version 6.11.0 npm: 3.10.10 epoll (installed by MMM-Button npm install): appears to be 0.1.21

Edit 2: apologies. Linked over from MMM-Button and didn't realize I was on a separate project when commenting. The underlying issue seems to be the same though.

The only way I found to get around it is to recompile(?) electron, and use a newer version? In ~/MagicMirror:

$ npm install --save-dev electron-rebuild
$ npm rebuild --runtime=electron --target=1.6.11 --disturl=https://atom.io/download/atom-shell --build-from-source

Oddly, I also had to remove epoll from the MMM-Button directory and make sure (I think?) I installed it (npm install epoll) while in ~/MagicMirror. I think maybe the electron upgrade has caused other issues, but it seems to get past this NODE_MODULE_VERSION problem?

rjhornsby avatar Jun 16 '17 23:06 rjhornsby

I've run into the same issue today with MagicMirror 2.7.0-develop, and I could successfully resolve it with these steps:

cd modules/MMM-PIR-Sensor
rm package-lock.json
rm -r ./node_modules
npm i

Hope this helps!

balassy avatar Jan 04 '19 21:01 balassy

For me none of the solutions worked. However I solved it now

  1. Navigate to the MMM-PIR-Sensor folder
  2. Run npm install --save-dev electron-rebuild
  3. Remove the node-modules folder, as well as the packages-lock.json file.
  4. Run npm install
  5. Run ./node_modules/.bin/electron-rebuild to rebuild everything

Now it is working. Hope this helps ;)

manufunk avatar Sep 18 '19 19:09 manufunk