execSync
execSync copied to clipboard
Running win32 binary in Nodejs x64
We were using grunt-spawn-shell plugin, which uses the execSync plugin to run a specific command. We kept getting an error %1 is not a valid win32 application
. After trying to debug for a while, we found out that the 64-bit version of Node does not work to run 32-bit DLLs.
This is fine on the face of it, but the messaging was confusing and lacking in details. There are also no mention of this in the documentation as far as I could find.
I ran into the same problem, and it also took me a while to figure this out.
BTW, seems this is a problem only if you prevent execSync from building the native extensions using node-gyp. The 32-bit prebuilt modules are only a fallback option. See [here](https://github.com/cri5ti/grunt-shell-spawn/issues/30 here)