I’m new to Blynk, that looks to be a really nice IoT platform, congratulations for this amazing work!!
I have one widget that gets temperature from DS18B20 running on a nodeMCU and temperature and humidity from a DHT22 running on a Raspberry Pi, and they are ok.
I’m trying now working with buttons for change some relay’s state, so I looked at some examples and did a simple test code using js. My problem by now is when I execute the command:
sudo NODE_PATH=/usr/lib/node_modules node /home/pi/Blynk/test.js
Connecting to TCP: blynk-cloud.com 80
Error: Cannot find module ‘/usr/local/lib/node_modules/onoff’
as you see node_modules is on /usr/lib, not /usr/local/lib:
$ ls /usr/lib/node*
blynk-library node-gyp npm-check onoff
node-dht-sensor npm npm-check-updates
and under /usr/local/lib there is nothing about it:
$ ls /usr/local
bin etc games include lib man sbin share src
But my poor knowledge on linux and programming didn’t help to find the problem, looks to me some faulty install, so I’m asking for your help!
Thanks in advance!