BluetoothLE-Examples icon indicating copy to clipboard operation
BluetoothLE-Examples copied to clipboard

Cannot seem to install dependencies via package.json

Open msnyder415 opened this issue 10 years ago • 1 comments

Hi ! I am trying to run the sensortag examples. Admittedly, I know very little node.js. I am doing this from a 2nd gen raspberry pi.

When I run npm install from sensorTag/sensorTagExample, I get these errors:

$ npm install npm WARN package.json [email protected] No repository field. npm WARN package.json [email protected] No README data npm WARN optional dep failed, continuing [email protected] \

[email protected] install /home/pi/work/BluetoothLE-Examples/sensorTag/sensorTagExample/node_modules/sensortag/node_modules/noble-device/node_modules/noble node-gyp rebuild

child_process: customFds option is deprecated, use stdio instead. make: Entering directory '/home/pi/work/BluetoothLE-Examples/sensorTag/sensorTagExample/node_modules/sensortag/node_modules/noble-device/node_modules/noble/build' CC(target) Release/obj.target/hci-ble/src/hci-ble.o ../src/hci-ble.c:9:33: fatal error: bluetooth/bluetooth.h: No such file or directory compilation terminated. hci-ble.target.mk:79: recipe for target 'Release/obj.target/hci-ble/src/hci-ble.o' failed make: *** [Release/obj.target/hci-ble/src/hci-ble.o] Error 1 make: Leaving directory '/home/pi/work/BluetoothLE-Examples/sensorTag/sensorTagExample/node_modules/sensortag/node_modules/noble-device/node_modules/noble/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.7-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/work/BluetoothLE-Examples/sensorTag/sensorTagExample/node_modules/sensortag/node_modules/noble-device/node_modules/noble gyp ERR! node -v v0.12.1 gyp ERR! node-gyp -v v1.0.2 gyp ERR! not ok npm ERR! Linux 3.18.7-v7+ npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" npm ERR! node v0.12.1 npm ERR! npm v2.5.1 npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-gyp rebuild npm ERR! Exit status 1

msnyder415 avatar Jun 05 '15 21:06 msnyder415

@msnyder415 make sure you have libbluetooth-dev installed, see: https://github.com/sandeepmistry/noble#ubuntudebianraspbian

sandeepmistry avatar Jun 06 '15 16:06 sandeepmistry