danielolson13 / wink-mqtt

Enable local-control of a rooted Wink Hub with MQTT
MIT License
31 stars 9 forks source link

mqtt will not start on rooted hub #8

Closed qwiksilver closed 8 years ago

qwiksilver commented 8 years ago

I followed the instructions in the read.me file. Everything copied over, permissions are set, etc. MQTT will not start. The following is in the log:

Error: Cannot find module 'mqtt' at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) at Module.require (module.js:364:17) at require (module.js:380:17) at Object. (/opt/wink-mqtt/wink-mqtt.js:1:74) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10)

My hub is running v 2.49. Is this a file path issue? Any suggestions as to how to correct?

qwiksilver commented 8 years ago

Contents of [root@flex-dvt wink-mqtt]# = LICENSE README.md monit-mqtt mqtt package.json wink-mqtt wink-mqtt.js

danielolson13 commented 8 years ago

You need to use npm to install the mqtt node package locally on a computer and then copy those packages to the wink

On Sat, Jul 30, 2016 at 9:51 PM qwiksilver notifications@github.com wrote:

Contents of [root@flex-dvt wink-mqtt]# = LICENSE README.md monit-mqtt mqtt package.json wink-mqtt wink-mqtt.js

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/danielolson13/wink-mqtt/issues/8#issuecomment-236402562, or mute the thread https://github.com/notifications/unsubscribe-auth/AEs5GLl4pPKtQM8yGQq1DMcs_lNAZ1Waks5qa_-ggaJpZM4JY7va .

qwiksilver commented 8 years ago

Daniel, I missed that step last night. I did as you stated and installed the wink-mqtt package on the host pc, however, I am still receiving the same error.

qwiksilver commented 8 years ago

Daniel, I just found my misstep. I was copying the wrong folder. I copied all of your files, but did not copy the node_modules folder (was in the wrong subfolder when I ran the copy). Once I captured the correct folder and the node_modules subfolder, all is well. Thank you for your assistance and for developing this application. - Best, Frank