Closed Apollon77 closed 2 months ago
SHould it be added to allow fallback local builds?
Hmm, good question. We should either ship the source or a prebuilt binary for your scenario. We currently do neither.
I could add the missing prebuild targets similar to https://github.com/node-usb/node-usb/blob/master/.github/workflows/prebuild.yml#L18 which would be the best long term fix, but short-term would you mind crafting a PR to modify the .vscodeignore
file to ship exactly what you need to build locally?
Ideally both :-) So shiop soiurce that - for the special cases you can not prebuild - always a local build works ... and yes you could add common sources like armhf, armv7 and such targets too. But that could never be really complete, so I would go both ways. Yes I can do a PR
I get the same error when trying to run npm i webbluetooth
on a X64 Windows machine. 🤣
I get the same error when trying to run npm i webbluetooth on a X64 Windows machine. 🤣
Which architecture do you have?
I get the same error when trying to run npm i webbluetooth on a X64 Windows machine. 🤣
Which architecture do you have?
All my machines are x86_64 based.
All my machines are x86_64 based.
That should be fine, we bundle the native binary for that. Can you share any further logs?
That should be fine, we bundle the native binary for that. Can you share any further logs?
Sure.
Commands used:
cd /d "T:\Projects\web-bluetooth-test"
npm install webbluetooth
Enviroment information:
Thanks for the logs, the install should be getting the prebuild binary for your platform rather than running a build
@FirokOtaku I've just tested this on x86_64 Windows 10 machine and it worked as expected.
npm install webbluetooth
downloaded a prebuild for the host rather than running the build process.
npm: 10.x node: 20.x
This may be an issue with your specific machine, but #180 will now allow builds to run locally anyway (if all prerequisites are met).
@thegecko It's wired that I just tried npm i webbluetooth
on my home PC (with the same architecture of x86_64 windows. Only different is it runs with NodeJS 19) and it runs successfully.
But it still not works on my work PC (which generated the error logs above).
So, yeah, that seems an machine-specific issue. 🤣 Maybe I should wipe some environment variables or have a full clean install of NodeJS.
@thegecko One question ... when looking at https://github.com/thegecko/webbluetooth/blob/master/.github/workflows/prebuild.yml#L42 I could guess that prebuild is only done for nodejs 16 ?! SO not 18, not 20 ... (ok also not 19) ... but ok I do not know example when N-ABI potentially changed or was stabkle, but could it be taht 16..19 had the same ABI and Node.js 20 has a different one? (just guessing).
And yes without #180 any local build will fail
We use NAPI which is backwards compatible and not tied to specific node versions:
NAPI 6: https://github.com/thegecko/webbluetooth/blob/master/package.json#L55
Which should be v10.20.0+, v12.17.0+, 14.0.0 and all later versions: https://nodejs.org/docs/v20.12.1/api/n-api.html#node-api-version-matrix
@FirokOtaku I'm going to close this issue as it seems to be setup specific and a little OT :) Feel free to open a new issue if you get to the bottom of it.
When using webbluetooth I get (after installing cmake):
It seems that SimpleBLE is not delivered as source files in the npm package -.. which is true ... https://github.com/thegecko/webbluetooth/blob/master/.npmignore#L4
SHould it be added to allow fallback local builds?