Closed carboleda closed 3 years ago
Thanks for tackling this @carboleda 🙂
This is a cool addition to the docs and would've been helpful when we were adding the usb-detection dependency to our Electron app!
I found the Electron docs' page on using native modules to be very helpful during this setup. Perhaps this module's documentation might be a little easier to maintain if it was mostly just a link to the Electron docs?
# Install
...
## Install for Electron
This module uses native extensions and needs to be compiled for your
target version of Electron. Precompiled binaries for recent Node.js and
Electron versions are built and published using [prebuild][] and can be
installed automatically using [electron-rebuild][].
See the [Electron docs for using native modules][electron-native-modules]
to ensure your project is set up to correctly use the prebuilt binaries for
your version of Electron.
[prebuild]: https://github.com/prebuild/prebuild
[electron-rebuild]: https://github.com/electron/electron-rebuild
[electron-native-modules]: https://www.electronjs.org/docs/tutorial/using-native-node-modules
@mcous This is a great alternative! Also open to this instead if you want to create a PR
Definitely wouldn't want to snipe a good contribution from @carboleda, so I'd rather leave this as advice for them to potentially incorporate into their PR that they already put the effort into opening. Just saw this open and wanted to chime in because I had experienced the same problem
@carboleda The heading and description that @mcous suggested reads really nice. We can use that and add your steps below.
Thanks for being courteous @mcous ❤️
@carboleda The heading and description that @mcous suggested reads really nice. We can use that and add your steps below.
Ok @MadLittleMods that's perfect for me, the description of @mcous is very relevant! @mcous could you create a PR?
@carboleda @MadLittleMods sure thing! I'll put a PR up tonight
@carboleda https://github.com/MadLittleMods/node-usb-detection/pull/120 is now merged. Are you still interested in rebasing on master
and adding your instruction step list below that Electron install section?
@carboleda #120 is now merged. Are you still interested in rebasing on
master
and adding your instruction step list below that Electron install section?
Yes, of course! I going to update my PR!
Closing as review points were never met
This change help to fix issue #116 Steps to fix error detection.node was compiled against a different Node.js version using NODE_MODULE_VERSION 72. This version of Node.js requires NODE_MODULE_VERSION 80. This error occur when usb-detection module is used together with electron.js