Comments (12)
Any updates here? Just bought a sensor that I want to starting developing for.
from metawear-sdk-javascript.
Node 13.0.8
Unfortunately doesn't build.
It works fine with Node 8.15.0.
Any updates on this ?
from metawear-sdk-javascript.
What specifically is broke when building on newer NodeJS releases?
from metawear-sdk-javascript.
Sorry, needed some time to test this.
Example with node 10.15.0
:
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/polyclick/.nvm/versions/node/v10.15.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/Users/polyclick/.nvm/versions/node/v10.15.0/bin/node" "/Users/polyclick/.nvm/versions/node/v10.15.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/polyclick/Desktop/metatest/node_modules/metawear/node_modules/ffi
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/bluetooth-hci-socket):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"linux,android,win32","arch":"any"} (current: {"os":"darwin","arch":"x64"})
from metawear-sdk-javascript.
When running this install in node 8.15.0
. The setup completes perfectly but I also see this is the logs:
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/bluetooth-hci-socket):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"linux,android,win32","arch":"any"} (current: {"os":"darwin","arch":"x64"})
If it really is optional, maybe it can be skipped for other node versions (no idea if this is possible)?
from metawear-sdk-javascript.
Does node-gyp
install correctly on the newer NodeJS releases? Based on your log, that is the module that is failing.
The bluetooth-hci-socket
module is already skipped, as indicated in the log.
from metawear-sdk-javascript.
I'm not sure how to test this tbh. These are the errors node-gyp gives:
^
../src/ffi.cc:111:11: error: no member named 'ForceSet' in 'v8::Object'
target->ForceSet(Nan::New<String>("RTLD_NEXT").ToLocalChecked(), WrapPointer((char *)RTLD_NEXT), static_cast<P...
~~~~~~ ^
../src/ffi.cc:114:11: error: no member named 'ForceSet' in 'v8::Object'
target->ForceSet(Nan::New<String>("RTLD_DEFAULT").ToLocalChecked(), WrapPointer((char *)RTLD_DEFAULT), static_...
~~~~~~ ^
../src/ffi.cc:117:11: error: no member named 'ForceSet' in 'v8::Object'
target->ForceSet(Nan::New<String>("RTLD_SELF").ToLocalChecked(), WrapPointer((char *)RTLD_SELF), static_cast<P...
~~~~~~ ^
../src/ffi.cc:120:11: error: no member named 'ForceSet' in 'v8::Object'
target->ForceSet(Nan::New<String>("RTLD_MAIN_ONLY").ToLocalChecked(), WrapPointer((char *)RTLD_MAIN_ONLY), sta...
~~~~~~ ^
../src/ffi.cc:123:11: error: no member named 'ForceSet' in 'v8::Object'
target->ForceSet(Nan::New<String>("FFI_ARG_SIZE").ToLocalChecked(), Nan::New<Uint32>((uint32_t)sizeof(ffi_arg)...
~~~~~~ ^
../src/ffi.cc:124:11: error: no member named 'ForceSet' in 'v8::Object'
target->ForceSet(Nan::New<String>("FFI_SARG_SIZE").ToLocalChecked(), Nan::New<Uint32>((uint32_t)sizeof(ffi_sar...
~~~~~~ ^
../src/ffi.cc:125:11: error: no member named 'ForceSet' in 'v8::Object'
target->ForceSet(Nan::New<String>("FFI_TYPE_SIZE").ToLocalChecked(), Nan::New<Uint32>((uint32_t)sizeof(ffi_typ...
~~~~~~ ^
../src/ffi.cc:126:11: error: no member named 'ForceSet' in 'v8::Object'
target->ForceSet(Nan::New<String>("FFI_CIF_SIZE").ToLocalChecked(), Nan::New<Uint32>((uint32_t)sizeof(ffi_cif)...
~~~~~~ ^
Which then let me to this post: node-ffi/node-ffi#468
So bascially we're stuck with node 8?
from metawear-sdk-javascript.
There's nothing we can do then if node-gyp doesn't work past node8.
It looks like there have been PRs to address this limitation but none of them have been merged.
from metawear-sdk-javascript.
@scaryghost What is the reason in using git://github.com/king6cong/node-ffi.git#ce274be
as dependency instead of using the official repo (https://github.com/node-ffi/node-ffi/commits/master) which seems to have fixed the node-gyp problems mentioned above?
from metawear-sdk-javascript.
@scaryghost What is the reason in using
git://github.com/king6cong/node-ffi.git#ce274be
as dependency instead of using the official repo (https://github.com/node-ffi/node-ffi/commits/master) which seems to have fixed the node-gyp problems mentioned above?
The linked PR is still open. If a fix has been in fact merged, which commit was it?
The node-ffi fork fixes an issue with callback functions being garbage collected.
from metawear-sdk-javascript.
Hey, unfortunately there's still no official support on node>8 for ffi and bluetooth-hci-socket which are metawear dependencies. We are a bit stuck waiting for those third parties to update.
I got it to run just fine on node v10 by doing a combination of the posts mentioned above and using a fork of the bluetooth-hci-socket that supports node v10:
-
You can install the nodev10 compliant version of bluetooth-hci-socket using:
npm install "https://github.com/abandonware/node-bluetooth-hci-socket"
OR
npm install "https://github.com/jrobeson/node-bluetooth-hci-socket/#fix-builds-for-node-10" -
You need to update the node-ffi library to use the latest official release 2.3.0 (I might update that in our official package.json file shortly)
npm install "node-ffi/node-ffi@6221b31"
Again we are a bit stuck here until those two libraries/packages are officially updated to work on node v10 or above.
My version: v10.19.0
I attached my package.json file for reference.
I will keep this discussion open for now.
package.json.txt
from metawear-sdk-javascript.
Latest commit works on Node 10.
Might try Node 12 but 8 and 10 are supported and stable for now.
from metawear-sdk-javascript.
Related Issues (17)
- How can I warp a struct which is returned from C++ API? HOT 4
- Errors installing on Rasbian Stretch HOT 1
- installation fails on node 8.10 HOT 3
- Plan for supporting React Native HOT 1
- node-gyp build hangs on raspberry pi HOT 1
- Parsing DATA_ARRAY data type not working correctly HOT 2
- How to warp JS variables into a struct then pass it to C++ API? HOT 3
- Step Counter HOT 1
- Node >= 13 not supported HOT 1
- Сhange the device name permanently with macro not working
- MetaTracker wouldn't connect unless reset HOT 3
- Weird battery values HOT 4
- Using cordova to integrate MetaWear BLE sensor HOT 3
- install script not working HOT 5
- Reconnect Fails HOT 1
- Error when installing sdk on Mac HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from metawear-sdk-javascript.