question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Electron-rebuild vs npm rebuild?

See original GitHub issue

I’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:closed
  • Created 5 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
nicolasnoblecommented, Jun 22, 2018

Several things to note here:

  • The main advantage of electron-rebuild is to avoid having to specify the runtime version number, so you only have one location to update the electron runtime version instead of two.
  • The main downside of native extensions is that there are few of them that understand how to ship things for electron - but grpc does. So using electron-rebuild with 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-rebuild at all.

We will alter our documentation to be more specific about all this.

1reaction
murgatroid99commented, Jun 22, 2018

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found