Closed jguillod closed 9 years ago
have same problem :(
Sorry folks, I haven't maintained this project properly for a long time. The repository you're looking for is this awesome fork — https://github.com/eugeneware/wiring-pi
Please submit your issues there where you'll find better help, I don't own a RPi2, so I can't help.
However, from looking at the logs @jguillod posted, my first guess would be a node version mismatch, make sure you're using Node v0.10.
I had the same problem. I did not have git installed. After I installed git it worked.
When executing
npm install wiring-pi
on a Raspberry PI 2 the following log contained errorpi@raspberrypi ~ $ npm install wiring-pi npm WARN package.json gpio-stream@1.0.14 No repository field.
Cloning libWiringPi ... done. patching file ./wiringpi/devLib/Makefile patching file ./wiringpi/gpio/Makefile Making libWiringPi ... done. Making devLib ...done. Unistalling gpio utility ... done. Making gpio utility ... done. Installing gpio utility ... done. Making wiring-pi ... child_process: customFds option is deprecated, use stdio instead. make: Entering directory '/home/pi/node_modules/wiring-pi/build' CXX(target) Release/obj.target/wiringPi/src/addon.o ../src/addon.cc: In function ‘void throwerror(const char, ...)’: ../src/addon.cc:30:3: error: ‘ThrowException’ is not a member of ‘v8’ ../src/addon.cc:30:43: error: ‘New’ is not a member of ‘v8::String’ wiringPi.target.mk:126: recipe for target 'Release/obj.target/wiringPi/src/addon.o' failed make: _\ [Release/obj.target/wiringPi/src/addon.o] Error 1 make: Leaving directory '/home/pi/node_modules/wiring-pi/build' gyp ERR! build error gyp ERR! stack Error:
make
failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23) gyp ERR! stack at ChildProcess.emit (events.js:110:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1067:12) gyp ERR! System Linux 3.18.14-v7+ gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/pi/node_modules/wiring-pi gyp ERR! node -v v0.12.0 gyp ERR! node-gyp -v v1.0.2 gyp ERR! not ok done. Enjoy ! wiring-pi@2.0.0 node_modules/wiring-piAnd the module cannot be loaded in node:
pi@raspberrypi ~ $ node
Thanks