Closed Maus34 closed 8 years ago
Did you install i2c globally?
sudo npm install i2c -g
I did sudo npm install i2c -g
and got the folder /usr/local/lib/node_modules/i2c
in node: > var i2c = require('i2c');
gives me Error: Cannot find module i2c
I checked again with npm -g ls and in npm\package.json.
Manually:
var i2c = require('/usr/local/lib/node_modules/i2c');
gives me undefined
The owner of /usr/local/lib/node_modules/i2c was nobody
I changed it to root and then to pi, but no change
I tried it on my new Raspberry 3, but with the same result
works now. I used the wrong folder
I installed the latest version with
npm install i2c
Compiling worked well with gcc 4.8 and I got the folder /home/pi/node-i2c But in node I do not have the module i2c: I checked withnpm -g ls
and I have no entry in npm\package.json.