gleeds / cloudbbq

A Bluetooth to MQTT bridge for the Tenergy Solis Digital Meat Thermometer and other similar devices.
MIT License
45 stars 12 forks source link

Error: Cannot find module 'config' #1

Closed ggreeve closed 5 years ago

ggreeve commented 5 years ago

Hi there, playing a bit with your code since I was looking for this exact solution to send my 6-probe bbq temp the cloud

I get this one error below. do you mind helping me out here, what am I missing? Error probably caused by one of these lines in app.js

var config = require('config') var mqttConfig = config.get('mqtt')

Thanks again..

sudo npm start

cloudbbq@1.0.0 start /home/pi/blue/cloudbbq node app.js

module.js:550 throw err; ^

Error: Cannot find module 'config' at Function.Module._resolveFilename (module.js:548:15) at Function.Module._load (module.js:475:25) at Module.require (module.js:597:17) at require (internal/module.js:11:18) at Object. (/home/pi/blue/cloudbbq/app.js:5:14) at Module._compile (module.js:653:30) at Object.Module._extensions..js (module.js:664:10) at Module.load (module.js:566:32) at tryModuleLoad (module.js:506:12) at Function.Module._load (module.js:498:3)

gleeds commented 5 years ago

I've not seen this exact issue before, can you check a few things for me:

ggreeve commented 5 years ago

Hi thanks, Ok I do not have a CONFIG folder in my node_modules directory. Can I simply copy the one from your zip to it?

Node v8.12.0 Npm v6.4.1

Btw when I comment out those lines that use the CONFIG the rest of the program functions and does read my temps over Bluetooth. So that portions works fine

Also separate mqtt tests work and reach my broker in the cloud, so mqtt looks to be ok

ggreeve commented 5 years ago

Hi I got it working. Performed a Npm install CONFIG

That did a trick. Thanks for pointing out the missing CONFIG folder.

What’s you PayPal account so I can send you a couple bucks for a beer/coffee

gleeds commented 5 years ago

If you really want to, it's my username at gmail, but I'm just happy that someone else is getting some use of this project.