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.

electon-forge not compiling usb-detection

See original GitHub issue

Preflight 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

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:closed
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
sensslencommented, Mar 22, 2021

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.

0reactions
sensslencommented, Sep 24, 2021

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.

Read more comments on GitHub >

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

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