JamesBarwell / rpi-gpio.js

Control Raspberry Pi GPIO pins with node.js
MIT License
657 stars 116 forks source link

fs has no method 'exists' ? #22

Closed GPrathap closed 9 years ago

GPrathap commented 9 years ago

This is the stack trace of error. /home/pi/node_modules/rpi-gpio/rpi-gpio.js:376 fs.exists(PATH + '/gpio' + pin, function(exists) { ^ TypeError: Object # has no method 'exists' at isExported (/home/pi/node_modules/rpi-gpio/rpi-gpio.js:376:8) at /home/pi/node_modules/rpi-gpio/rpi-gpio.js:160:17 at /home/pi/node_modules/rpi-gpio/node_modules/async/lib/async.js:641:34 at Array.0 (/home/pi/node_modules/rpi-gpio/node_modules/async/lib/async.js:557:34) at EventEmitter._tickCallback (node.js:190:39)

GPrathap commented 9 years ago

I resolved this error after installing newest version of NodeJs (https://learn.adafruit.com/node-embedded-development/installing-node-dot-js)

JamesBarwell commented 9 years ago

Yes it sounds like a node version issue. Thanks for the link - I've updated the nodejs installation guidelines in the readme.