title: How do I access USB with Electron?
body: <p><em>My systemenvironment: Windows 10 with Visual Studio 2015 (including C++ Compiler Tools) and node.js installed</em></p>
  
  <p>I tried to include a node library into the electon-quick-start-project and failed.</p>
  
  <p>First of all I tried electron-usb to include electron-usb. <a href="https://stackoverflow.com/questions/39621113/using-electron-usb-with-electron">You can found my problem here</a>. Unfortunately I couldn't solve it.</p>
  
  <p>Therefore I tried to include usb. I found help how to do this <a href="https://discuss.atom.io/t/use-node-usb-inside-electron/16748/3" rel="nofollow noreferrer">here</a>
  I did every step according to this description:</p>
  
  <ul>
  <li>npm install --save usb</li>
  <li>changing the variables property in the node_modules/usb/binding.gyp to include module_name and module_path</li>
  <li>electron-gyp node-gyp rebuild --target=0.26.0 --arch=ia32 --dist-url=<a href="https://atom.io/download/atom-shell" rel="nofollow noreferrer">https://atom.io/download/atom-shell</a></li>
  </ul>
  
  <p>When I executed the rebuild command, I got a build error:  <strong>error C2011: 'timespec': 'struct' type redefinition (compiling source file ..\libusb\libusb\core.c)</strong>. Always the same error in different files.</p>
  
  <p>I included HAVE_STRUCT_TIMESPEC in the project-files. But it didn't work either afterwards.</p>
  
  <p>Now I ask myself, what is the easiest and best way to access USB with Electron? Which library can you recommend? Do you know any complete tutorial to include this library into electron?</p>