Open Rehoni opened 6 years ago
Reason:
node\_modules\\zerorpc\\node\_modules\\zeromq\\lib\\index.js
var EventEmitter = require('events').EventEmitter
, zmq = require('../build/Release/zmq.node')
, util = require('util');
this line:
zmq = require('../build/Release/zmq.node')
support: Linux/Mac not support: Win
Solution:
Change
node\_modules\\zerorpc\\node\_modules\\zeromq\\lib\\index.js
from
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')
can support Linux/Mac/Win, and could find the zmq.node
dll lib file.
detailed info please refer my Chinese post: 【已解决】windows中启动Electron-python报错:Uncaught Error A dynamic link library DLL initialization routine failed zerorpc zeromq zmq.node
When i using zerorpc in my electron app, it throws an Exception:
My computer path, (and i'm using vscode to develop and debug my electron apps): node@v8.11.2 npm@v5.6.0 electron@v2.0.2 python@3.6.4 windows@10 Enterprise visual studio@2017
I think the reason may be this.![image](https://user-images.githubusercontent.com/19381903/40465330-cc56e9d4-5f52-11e8-9b0d-1ac18e4ca941.png)
There throws a lot of warning about the process of node-gyp compiling the ZeroMQ lib, and i guess if i solved these warnings, the DDL Error would be solved also?
And i'll appreciate if there got another solution for this DDL Error! (:з)∠)