jperkin / node-rpio

Raspberry Pi GPIO library for node.js
858 stars 124 forks source link

Error: Module version mismatch. Expected 46, got 57. #71

Closed candelo closed 5 years ago

candelo commented 6 years ago

Error: Module version mismatch. Expected 46, got 57. at Error (native) at Object.Module._extensions..node (module.js:434:18) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Module.require (module.js:353:17) at require (internal/module.js:12:17) at bindings (/home/pi/LedTest/node_modules/bindings/bindings.js:81:44) at Object. (/home/pi/LedTest/lib/rpio.js:17:34) at Module._compile (module.js:409:26) at Object.Module._extensions..js (module.js:416:10)

pi@raspberrypi:~/LedTest/examples $ node -v v4.8.2

arovillard commented 5 years ago

you are most likely running a node version that doesn't work with the version of binding. I had this issue and my system was running v 4.x.x. after updating it to 8 it worked as expected. If doing sudo node -v returns a version lower than 8 then try upgrading to 8 and see if this also solves this issue for you..

jperkin commented 5 years ago

Right, you need to use the same version of node that you built with. If you upgrade node then you need to rebuild.