Best practice to support electron-rebuild
See original GitHub issueHi,
I’m a maintainer of node-serialport
and a bunch of my users use electron and electron-rebuild
. We hadn’t been supporting it as well as I’d like and with our latest beta we’ve upgraded nan
and cleaned up our build processes. This has broth improved electron support as we work with the latest versions and made it more annoying.
According to this issue we can now run electron-rebuild
but we must first remove our binary file manually. It currently resides in build/Release/serialport.node
It will be there if you’ve built it or downloaded it via pre-gyp
during install. That seems annoying. I’m a bit new to the electron ecosystem so I wanted to check with you to see if we could do something to make this easier, or provide better instructions to get it going.
Thanks!
Issue Analytics
- State:
- Created 7 years ago
- Comments:12 (9 by maintainers)
Top GitHub Comments
I ran this command from
node_modules
, and it reported thatserialport.node
already installed.Passing the
--update-binary
option works for me, it can overwrite a pre-installedbuild/Release/serialport.node
.I believe you can add the
--update-binary
option to the rebuildNativeModules function to make it work: https://github.com/electron/electron-rebuild/blob/master/src/main.js#L122Hope this information will help you!
Can you just remove node-pre-gyp? tbh, that’d be far-and-away the easiest way to solve this problem