Struggling to get node-usb working in electron


Hi all,

I’ve been trying for some hours to get node-usb working in electron - referring heavily to this amongst many other resources. I keep coming up against the same error when trying to import the usb library in a script:

In my main.js I do:

var usb = require('usb')

This results in a pop-up window like so:

I don’t believe I can extract much meaning from this error - it looks like an error occurred processing an error message, which is itself unreported.

I’ve tried blindly correcting possible problems based on google searches for the error text, including those suggested here - to no avail!

I’d really appreciate some advice on where to go from here in solving the mysterious error.

Many thanks in advance for any advice you can offer!




Did you change the variables property in the node_modules/usb/binding.gyp to include module_name and module_path?
Are you using Microsoft Visual Studio Community 2013 with Update 5?
Did you recompile the usb module after using your electron version? Use node-usb inside electron