Open reconbot opened 8 years ago
Any progress on this front? serialport binary version mismatch problems are the #1 support hassle for the cncjs project. If I could include a bunch of different precompiled serialport binaries for a few different nodejs versions on a few common platforms, I could make a sleek installation package that Just Works.
It seems that prebuildify might be a good solution. It lets you package binaries for different architectures X node ABIs X electron/node, to be selected dynamically. The "node ABI" dimension will collapse when N-ABI becomes the norm.
Last week I put about 4 or 5 hours into it with no avail. I'll check out prebuildify.
Prebuildify is pretty rad, I'm looking into how to do a cross platform publish but I like this approach a lot and have wanted it for years. ❤️
Thanks for working on it. I did a test where I had it compile against a lot of different node versions for one platform, and that worked well. I haven't tried other platforms yet, and I haven't tried to modify serialport to use the result. I presume that you can do that easily given the recipe in prebuildify.
This is primarily for Electron as it's the classic "I have the wrong version of the binary installed" and "I want to distribute multiple versions of the binary" problem child. This would also help track down a few instances of weirdness in bug reports.
The crux to the issue is that the binary isn't overwritten by default by npm, electron-rebuild (pr's have been merged but not yet released), electron-prebuilt, and who knows what else when the target node version is changed. (via nvm, or targeting electron)