TooTallNate / ref

Turn Buffer instances into "pointers"
http://tootallnate.github.com/ref
453 stars 141 forks source link

%1 is not a valid Win32 application #82

Closed SimoneTosato closed 6 years ago

SimoneTosato commented 7 years ago

I'm trying to build an electron based app using native libraries and ref. Everything works fine on linux and mac but on windows i'm getting this error and i have no clue how to solve this.

C:\Users\simon\Desktop\win-unpacked\win-unpacked\resources\app\node_modules\bindings\bindings.js:83
        throw e
        ^

Error: %1 is not a valid Win32 application.
\\?\C:\Users\simon\Desktop\win-unpacked\win-unpacked\resources\app\node_modules\ref\build\Release\binding.node
    at Error (native)
    at Object.Module._extensions..node (module.js:597:18)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at bindings (C:\Users\simon\Desktop\win-unpacked\win-unpacked\resources\app\node_modules\bindings\bindings.js:76:44)
    at Object.<anonymous> (C:\Users\simon\Desktop\win-unpacked\win-unpacked\resources\app\node_modules\ref\lib\ref.js:5:
47)
    at Module._compile (module.js:570:32)

I'm working on Windows 10 64bit, Node v6.11.1 Python 2.7.13

SimoneTosato commented 7 years ago

@ddavidebor

TooTallNate commented 6 years ago

Since you mention Electron, please make sure you're following the instructions here since ref is a native module: https://github.com/electron/electron/blob/master/docs/tutorial/using-native-node-modules.md