abandonware / noble

A Node.js BLE (Bluetooth Low Energy) central module : Community maintained
https://libraries.io/npm/@abandonware%2Fnoble
MIT License
540 stars 162 forks source link

Failing to install on MacOS Mojave #159

Open CappyD opened 3 years ago

CappyD commented 3 years ago

Tried to install on MacOS Mojave (with node 14.15.3, npm 6.14.9) but running into problems. Any ideas?

$ sudo npm install -g --unsafe-perm @abandonware/noble Password:

@abandonware/noble@1.9.2-10 install /usr/local/lib/node_modules/@abandonware/noble node-gyp rebuild

CC(target) Release/obj.target/nothing/node_modules/node-addon-api/src/nothing.o LIBTOOL-STATIC Release/nothing.a CXX(target) Release/obj.target/binding/lib/mac/src/noble_mac.o CXX(target) Release/obj.target/binding/lib/mac/src/napi_objc.o CXX(target) Release/obj.target/binding/lib/mac/src/ble_manager.o CXX(target) Release/obj.target/binding/lib/mac/src/objc_cpp.o CXX(target) Release/obj.target/binding/lib/mac/src/callbacks.o SOLINK_MODULE(target) ../lib/mac/native/binding.node ld: malformed file /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks//CoreBluetooth.framework/CoreBluetooth.tbd:4:18: error: unknown enumerated scalar platform: zippered ^~~~ file '/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks//CoreBluetooth.framework/CoreBluetooth.tbd' clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [../lib/mac/native/binding.node] Error 1 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:194:23) gyp ERR! stack at ChildProcess.emit (events.js:315:20) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12) gyp ERR! System Darwin 18.7.0 gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /usr/local/lib/node_modules/@abandonware/noble gyp ERR! node -v v14.15.3 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @abandonware/bluetooth-hci-socket@^0.5.3-5 (node_modules/@abandonware/noble/node_modules/@abandonware/bluetooth-hci-socket): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @abandonware/bluetooth-hci-socket@0.5.3-6: wanted {"os":"linux,android,freebsd,win32","arch":"any"} (current: {"os":"darwin","arch":"x64"})

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @abandonware/noble@1.9.2-10 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @abandonware/noble@1.9.2-10 install script.

CappyD commented 3 years ago

BTW, Xcode is v9.4 with command-line tools installed.