Rebuild native extension
See original GitHub issueI have a native extension and I’d like to test it using electron-mocha. How can I run tests and make sure that the installed version of electron and extension that I built with #node-gyp are both built using the same runtime and are compatible?
I tried running ./node_modules/.bin/electron-rebuild .
, it says ✔ Rebuild Complete
but I am sure it didn’t do anything.
It seems that electron-rebuild only targets modules by name but that’s not the case here since my package.json is the module itself. Is it possible to point electron-rebuild to module.node or source code or bindings.gyp so it could do its magic?
Running electron throws error:
Module version mismatch. Expected 50, got 48.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Rubygems: Rebuild native extensions - makandra dev
This will reset all gems to a pristine state as if you'd reinstall them, and as a side effect, rebuild all native extensions....
Read more >Rebuild bundler gems with native extensions - Coderwall
If you are using bundler to manage your project's gem dependencies, and you need to rebuild the native extensions for one of those...
Read more >Do not rebuild native extensions on every install for git ...
+1 for this issue. We've noticed when we deploy to a running instance, bundle install will replace the native-library in a c-extension and...
Read more >How to rebuild native Ruby gems after a lib/system upgrade?
How to rebuild a Ruby gem with a native extension, after a library or system upgrade?
Read more >How do you precompile the native extensions for a ruby gem ...
Unpack the gem you want to rebuild: $ gem unpack nokogiri. Build your shiny new precompiled gem: $ rake native gem. You can...
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 FreeTop 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
Top GitHub Comments
I completely failed when committing this but this is now handled on this line in this commit 😆
https://github.com/electron/electron-rebuild/commit/885e9edc18d1d160be2e2a4ea419ed0451b0534c#diff-e954a0c620ecfedccb6c501ac9f5d046R83
Basically, we now check the root module as well so in your native module just run
electron-rebuild .
and it should work (note not released yet)I have the same question