title: Electron ffi rebuild issue: command not found
body: <p>I am struggling with the error:</p>
  
  <p>Uncaught Exception:
  Error: A dynamic link library (DLL) initialization routine failed." </p>
  
  <p>After some research and debugging, the likely issue is that the node module ffi has not been "rebuilt" for the electron environment.  I have tried following the steps at <a href="https://github.com/electron/electron/blob/master/docs/tutorial/using-native-node-modules.md" rel="nofollow noreferrer">https://github.com/electron/electron/blob/master/docs/tutorial/using-native-node-modules.md</a> to rebuild the package, but method 1, when copied to the letter, didn't work.  </p>
  
  <p>Method 2 of "Installing module and rebuilding for Electron" doesn't work because entering ./node_modules/.bin/electron-rebuild.cmd (I'm on Windows) doesn't work- Bash simply says "command not found" and I don't see others with this issue.  I've tried even running it from PowerShell in case git bash was causing issues, but I get a similar issue, although I also get an error stating:</p>
  
  <pre><code>At line:1 char:1
  +electron-rebuild.cmd
  +~~~~~~~~~~~~~~~~~~~
  _CategoryInfo : ObjectNotFound: (electron-rebuild.cmd:String) [], CommandNotFoundException
  +FullyQualifiedErrorID : CommandNotFoundException
  </code></pre>
  
  <p>I don't understand method 3 (manually building for Electron) and am hesitant to use it- namely I'm unsure of why there isn't an argument in the manual build command for specifying what package needs to be rebuilt.</p>
  
  <p>I have retried installing Electron Rebuild to the letter per the instructions in <a href="https://github.com/electron/electron-rebuild" rel="nofollow noreferrer">https://github.com/electron/electron-rebuild</a> multiple times (npm install --save-dev electron-rebuild) in project folder.  It seems to be installed in the correct location.</p>
  
  <p>Why is electron-rebuild not being recognized?  What will it take to get ffi installed properly?</p>
  
  <p>I'd also appreciate if someone could point me to some additional places to educate myself on what I might be missing with my conceptualization of this issue.  Thanks in advance!</p>