Raspberry Pi "jessie"+ Node.js + Blynk App + DHT11/DHT22/AM2302

Hi All

Does anyone have a step by step install to get this working?

I’ve tried all using



and I still get the
root@raspberrypi:/home/pi/blynk-library/linux# sudo NODE_PATH=/usr/local/lib/node_modules/blynk-library node ./blynk.temp.js
module.js:338
throw err;
^
Error: Cannot find module ‘blynk-library’
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object. (/home/pi/blynk-library/linux/blynk.temp.js:1:78)
at Module._compile (module.js:460:26)
at Object.Module._extensions…js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)

Thanks

Look like something wrong with paths to libraries. @vshymanskyy maybe you can help?

Please try:

sudo NODE_PATH=/usr/local/lib/node_modules/ node ./blynk.temp.js

Hi im having the same problem,i tried sudo NODE_PATH=/usr/local/lib/node_modules/ node ./blynk.temp.js
and i still get module.js:340
throw err;
^
Error: Cannot find module ‘blynk-library’
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. (/home/pi/blynk-sensor-test.js:1:78)
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)

@Dema323 this thread is more than a year old but I guess your fix is the same as it was back then.

Find the correct path for the blynk-library module.

sorry im new to java

Does that mean you have found the path or not?

1 Like

Yes, no need to extract or so just need to put the full path to the library otherwise he doesn’t find it.

Please check our latest guide on Node.js installation for Linux: http://help.blynk.cc/hardware-and-libraries/node-js/how-to-install-nodejs-library-on-linux