zeromq.node
zeromq.node copied to clipboard
Build success with Visual C++ 2015 build tools, but using it fails silently
Node-JS version: 6.9.1 ZMQ node version: 2.15.3 OS: Windows 10 64Bit
With the the Visual C++ 2015 build tools installed via npm install --global windows-build-tools, npm install zmq
/ npm rebuild zmq
seems to build correctly (i.e. no errors, just warnings). However, at the point of requiring it, node just exits silently without any errors provided. Example program:
console.log('start');
try {
console.log('trying');
require('zmq');
console.log('good');
} catch (error) {
console.log('error', error);
}
console.log('end');
Results in the following console output:
start
trying
When using the build tools provided by installing Visual Studio Community 2013, ZMQ builds just as well (again, no errors, but warnings), but this time the above program prints the expected:
start
trying
good
end
I encountered the same issue, and determined that require('zmq') loads libzmq-v100-mt-4_0_4.dll which has a dependency on MSVCP100.DLL and MSVCR100.DLL - both missing on my system. Installing the Visual C++ 2010 runtime fixed the problem. https://www.microsoft.com/en-us/download/details.aspx?id=14632
@xr250
Thank you so much!
It seems that the reason is zeromq.node comes with a (very old) zeromq dll in here and here.
We can do nothing until the library author update the versions...
You can also use zeromq.js, the build process is modernized and provides prebuilds for all major OSes as well as Electron (you can also build manually if you want). Same interface as this library (it is the predecessor).