kelly / node-i2c

Node.js native bindings for i2c-dev. Plays well with Raspberry Pi and Beaglebone.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Install problems

Maus34 opened this issue · comments

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 with npm -g ls and I have no entry in npm\package.json.

commented

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