sakirtemel / MMM-alexa

MIT License
51 stars 8 forks source link

npm onoff #12

Open bbreton09 opened 7 years ago

bbreton09 commented 7 years ago

Magicmirror start correctly, i have the red square but the buton on GPIO 4 do nothing.

Commande "gpio read 4" report 1 or 0 when i press it.

I try to launch "npm start dev" to debug, i have an error.

Whoops! There was an uncaught exception...
{ Error: Cannot find module 'onoff'
    at Module._resolveFilename (module.js:470:15)
    at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/electron/dist/resources/electron.asar/common/reset-search-paths.js:35:12)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Class.socketNotificationReceived (/home/pi/MagicMirror/modules/MMM-alexa/node_helper.js:15:28)
    at Socket.<anonymous> (/home/pi/MagicMirror/modules/node_modules/node_helper/index.js:98:10)
    at emitTwo (events.js:106:13)
    at Socket.emit (events.js:191:7)
    at /home/pi/MagicMirror/node_modules/socket.io/lib/socket.js:503:12 code: 'MODULE_NOT_FOUND' }

I try to install all dependancy "onoff" with the command "npm install" but after, i had this error

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

I try npm rebuild or npm install but nothing work. Have you got an idea ?

sakirtemel commented 7 years ago

@bbreton09 did you find any solution? if not there were bunch of commands that I was using, I can try to find it