Electron-rebuild vs npm rebuild?
See original GitHub issueI’m running into some issues trying to install gRPC@1.11.3. grpc-node team recommends against electron-rebuild: https://github.com/grpc/grpc-node/issues/250
Here’s the specific issue I’m facing: https://github.com/grpc/grpc-node/issues/412#issuecomment-399519651
I’m wondering what the right way to resolve these is. Do I want to electron-rebuild everything except gRPC and use npm rebuild --target=electron --target_runtime=2.0.2 --dist-url=https://atom.io/download/electron for only gRPC, or do I want to abandon electron-rebuild altogether?
Is there some additional benefit electron-rebuild brings to the table?
@amilajack, since I know you’re the one who’s going to respond to this, let me end this by thanking you in advance.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
node.js - What is the difference between electron-builder and ...
Electron-Builder provides a complete solution to build and package your app, and Electron-Rebuild is just for rebuilding dependencies. If you're ...
Read more >electron-rebuild - npm
This executable rebuilds native Node.js modules against the version of Node.js that your Electron project is using. This allows you to use ...
Read more >Native Node Modules | Electron
You can install modules like other Node projects, and then rebuild the modules for Electron with the electron-rebuild package. This module can automatically ......
Read more >electron-builder vs electron-packager vs electron-rebuild | npm trends
Comparing trends for .
Read more >Common Configuration - electron-builder
nodeGypRebuild = false Boolean - Whether to execute node-gyp rebuild before starting to package the app. Don't use npm (neither .npmrc ) for...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Several things to note here:
electron-rebuildis to avoid having to specify the runtime version number, so you only have one location to update the electron runtime version instead of two.electron-rebuildwith grpc brings more pain than it’s worth, mainly because we took great care of ensuring our code works with electron, and that we ship electron pre-built binaries.If grpc is the only extension you have that’s native, please do not use
electron-rebuildat all.We will alter our documentation to be more specific about all this.
One issue with just letting it fall back to building from source, at least historically, is that Electron version numbers can match io.js version numbers, and if the binary download is not parameterized on the runtime, it can end up incorrectly downloading io.js binaries instead and thinking that the installation is successful. I think this is the reason that the Electron documentation says to always build from source.