electon-forge not compiling usb-detection
See original GitHub issuePreflight Checklist
- I have read the contribution documentation for this project.
- I agree to follow the code of conduct that this project follows, as appropriate.
- I have searched the issue tracker for a bug that matches the one I want to file, without success.
Issue Details
- Electron Forge Version:
- 6.0.0-beta.54
- Electron Version:
- v12.0.1
- Operating System:
- Windows 10 (1909)
Expected Behavior
From the description I expect electron-forge to automatically compile all native dependencies automatically
Actual Behavior
When installing packages (see https://github.com/sensslen/Cgf.CameraControl.Main.Gui) only one of the two native dependencies is recompiled (node-hid). The other package (usb-detection) is not.
After running a manual build ( .\node_modules\.bin\electron-rebuild.cmd
) all is good.
To Reproduce
- Checkout https://github.com/sensslen/Cgf.CameraControl.Main.Gui
- Try npm run start
Additional Information
The issue seems to come from the fact that the native dependencies are not direct dependencies, as I failed to reproduce the issue in a minimal examtle that just contains the required native dependencies.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
electon-forge not compiling usb-detection · Issue #2205 - GitHub
I have searched the issue tracker for a bug that matches the one I want to file, without success. Issue Details. Electron Forge...
Read more >node.js - Error importing tensorflow js after npm run make
I'm running windows 10, node v12.13.0 , electron 8.2.1 with electron forge. My package.json is: { "name": "my-app", "productName": "my-app", ...
Read more >Electron Forge: Getting Started
Quickly scaffold an Electron project with a full build pipeline. ... Electron Forge is an all-in-one tool for packaging and distributing Electron ...
Read more >Native Node Modules | Electron
This module can automatically determine the version of Electron and handle the manual steps of downloading headers and rebuilding native modules for your...
Read more >Using Electron in TypeScript, the way we like it - Yoctopuce
Compilation and packaging ... In TypeScript, each source file represents a module, with imports and exports. All the modules must thus be compiled...
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
Hi, thanks for the suggestion. I know there are workarounds - as I wrote, I am able to run electron-rebuild manually and all is good afterwards. Nevertheless I feel this is a bug if the compilation is executed for one of two native dependencies only. Even more so, if things are compiling as expected when the native dependencies are added directly and not as dependency of some other node package.
To be honest, I haven‘t tried in a while. The app I attempted to build used worker threads which I was unable to make work properly in the electron environment. Therefore I resorted to an alternative for now.