kelly / node-i2c

Node.js native bindings for i2c-dev. Plays well with Raspberry Pi and Beaglebone.
Other
216 stars 91 forks source link

Cannot find module '../build/Release/i2c' #31

Closed Joopmicroop closed 10 years ago

Joopmicroop commented 10 years ago

running on rpi & node v0.10.26

module.js:340
    throw err;
          ^
Error: Cannot find module '../build/Release/i2c'
    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.<anonymous> (/home/pi/node_modules/i2c/lib/i2c.coffee:8:10)
    at Object.<anonymous> (/home/pi/node_modules/i2c/lib/i2c.coffee:119:4)
    at Module._compile (module.js:456:26)
    at Object.require.extensions..coffee (/home/pi/node_modules/i2c/node_modules/coffee-script/lib/coffee-script/coffee-script.js:22:21)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)

Seen your comment on https://github.com/kelly/node-i2c/issues/2 my install gives me the following

  npm http GET https://registry.npmjs.org/i2c
  npm http 304 https://registry.npmjs.org/i2c
  npm http GET https://registry.npmjs.org/bindings
  npm http GET https://registry.npmjs.org/underscore/1.2.4
  npm http GET https://registry.npmjs.org/coffee-script/1.3.3
  npm http GET https://registry.npmjs.org/repl/0.1.3
  npm http 304 https://registry.npmjs.org/bindings
  npm http 304 https://registry.npmjs.org/underscore/1.2.4
  npm http 304 https://registry.npmjs.org/coffee-script/1.3.3
  npm http 304 https://registry.npmjs.org/repl/0.1.3

  -> i2c@0.1.4 install /home/pi/node_modules/i2c
  -> node-gyp rebuild

  make: Entering directory `/home/pi/node_modules/i2c/build'
  CXX(target) Release/obj.target/i2c/src/i2c.o
  SOLINK_MODULE(target) Release/obj.target/i2c.node
  SOLINK_MODULE(target) Release/obj.target/i2c.node: Finished
  COPY Release/i2c.node
  make: Leaving directory `/home/pi/node_modules/i2c/build'
  i2c@0.1.4 ../../node_modules/i2c
  ├── bindings@1.1.1
  ├── repl@0.1.3
  ├── underscore@1.2.4
  └── coffee-script@1.3.3

I looked in the folder and the files do exist (meaning the build/Release/i2c.node)

mrutgerj commented 10 years ago

Did you install the i2c package? Globally, locally?

On 04/13/2014 06:02 PM, Joopmicroop wrote:

module.js:340

throw err;

^

Error: Cannot find module '../build/Release/i2c'

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/node_modules/i2c/lib/i2c.coffee:8:10)

at Object. (/home/pi/node_modules/i2c/lib/i2c.coffee:119:4)

at Module._compile (module.js:456:26)

at Object.require.extensions..coffee (/home/pi/node_modules/i2c/node_modules/coffee-script/lib/ coffee-script/coffee-script.js:22:21)

at Module.load (module.js:356:32)

at Function.Module._load (module.js:312:12)

running on rpi & node v0.10.26

— Reply to this email directly or view it on GitHub https://github.com/kelly/node-i2c/issues/31.

ahmtcn123 commented 6 years ago

Both are not work "Globally locally"