Can't run mmmagic on windows: DLL initialization routine failed


#1

Hello,

I’m in the process of creating the Windows version of our Electron app, we use mmmagic which I managed to build successfully on windows, albeit with a few warnings.

The problem is that when I launch the Electron app I get this error:

 Error: A dynamic link library (DLL) initialization routine failed.
\\?\E:\reveal-win\node_modules\mmmagic\build\Release\magic.node
    at Error (native)
    at process.module.(anonymous function) (ATOM_SHELL_ASAR.js:159:20)
    at process.module.(anonymous function) [as dlopen] (ATOM_SHELL_ASAR.js:159:20)
    at Object.Module._extensions..node (module.js:450:18)
    at Object.module.(anonymous function) (ATOM_SHELL_ASAR.js:159:20)
    at Object.module.(anonymous function) [as .node] (ATOM_SHELL_ASAR.js:159:20)
...

As I’ve seen in a similar problem for another package, this is a problem of binary bindings to atom shell which Electron uses…

Got any tips for me?

I’ve posted this as an issue on mmmagic github repo as well

Windows 10
npm -v 3.3.12
node -v 5.5.1
Electron-prebuilt: 0.36.7
Setup the windows environment following this checklist.


#2

I’ve been encountering this issue with multiple packages, I kept removing them as we weren’t strongly dependent on them but now the mdns package also fails with the same error…

What is the general advice to get through these kinds of problems?