Using usb-detection with electron v4 on intel mac

This page summarizes the projects mentioned and recommended in the original post on /r/electronjs

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • electron-react-boilerplate

    A Foundation for Scalable Cross-Platform Apps

  • Im trying to install usb-detection on my electron js project using electron-react-boilerplate . I get the following error due to the post install script and cant get passed it for running or packaging the app.

  • usb

    Improved USB library for Node.js

  • I'd recommend https://github.com/node-usb/node-usb instead of usb-detection, it has hot plug events available and is better maintained. It uses NAPI for its addons so they don't need to be rebuilt per Electron version, and more helpfully, you can run tests in NodeJS and then bundle it for Electron and you don't need to rebuild the module between each.

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
  • serialport

    Access serial ports with JavaScript. Linux, OSX and Windows. Welcome your robotic JavaScript overlords. Better yet, program them!

  • Strangely enough it does package fine with electron-builder but does not work in dev mode. The same happens when I try to use https://serialport.io/ which is also another module where you could achieve device detection.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts