-
-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zmq.node is not a valid Win32 Application Error using Electron #302
Comments
If you check this file: |
Any updates on this? I'm using electron 5 and having this same issue when trying to run the app on windows. I tried |
seems same error, please see my answer in this post A dynamic link library (DLL) initialization routine failed solution is: Change var EventEmitter = require('events').EventEmitter
, zmq = require('../build/Release/zmq.node')
, util = require('util'); to: var EventEmitter = require('events').EventEmitter
let path = require('path')
let zmqNodePath = path.join("..", "build", "Release", "zmq.node")
var zmq = require(zmqNodePath)
var util = require('util') |
I'm seeing this error to when trying with |
@mccauleyp Did you try with the prebuilds? |
@aminya, thanks for your question! Apologies, not 100% sure. I thought that simply doing
(i.e.
|
I am not sure if cross-compiling for Windows from Linux is supported. The prebuilds will be automatically selected, but it seems your cross-compiling setup makes it not work. Try using |
@aminya, Thanks for your suggestion! I've switched the GitHub Action to use
|
Aha, this was the problem! The
That just ensures that it doesn't try to rebuild anything. There's probably a better way to target just I'm not sure why the rebuild is failing. I'm getting C compiler errors in the GitHub Action there. I tried taking some inspiration from your PR (#522) by adding Thanks very much for your input, @aminya !!! |
You're welcome! Glad that it worked. It would be great if you can document your findings and make a merge request in case others run into the same issue, |
v6 was released. Please try again with the latest version, and report back if the issue still persists. |
Hi! So I am trying to create a (very) simple Electron app with (very) simple zeromq functionality, but am getting an error thrown from my
require('zeromq')
statement. My error seems to be similar to #242 , which was fixed by a prebuild-install update, but I'm still having this issue.Steps to Repro
var zmq = require("zeromq");
to main.jsVersions
Error message
App threw an error during load Error: \\?\C:\src\electron-quick-start\node_modules\zeromq\build\Release\zmq.node is not a valid Win32 application. \\?\C:\src\electron-quick-start\node_modules\zeromq\build\Release\zmq.node at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:160:31) at Object.Module._extensions..node (internal/modules/cjs/loader.js:722:18) at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:160:31) at Module.load (internal/modules/cjs/loader.js:602:32) at tryModuleLoad (internal/modules/cjs/loader.js:541:12) at Function.Module._load (internal/modules/cjs/loader.js:533:3) at Module.require (internal/modules/cjs/loader.js:640:17) at require (internal/modules/cjs/helpers.js:20:18) at Object.<anonymous> (C:\src\electron-quick-start\node_modules\zeromq\lib\index.js:6:11) at Object.<anonymous> (C:\src\electron-quick-start\node_modules\zeromq\lib\index.js:857:3)
The text was updated successfully, but these errors were encountered: