Labels

Linux (6) OpenCV (4) Deep Learning (3) MATLAB (3) Mac OS X (3) Windows (2) C# (1) Node JS (1)

2016年1月28日 星期四

Installing Node.js + ZeroMQ on Windows

ZeroMQ (ZMQ, 0mq) is a great TCP/IP libray wrapper and lightening fast for exchanging messages. Node.js is also famous for speed, so the two combined together can make a powerful distributed cloud server. However since ZeroMQ depends on OS level library, we need to re-compile ZeroMQ if we wants to use it in Node.js. This makes some challenges on installing on Windows. (If you didn't encounter any problem, Congratulations!)

The first problem we may encounter is:

The builds tools for v120 (Platform Toolset = 'v120') cannot be found

Because the default compiler is VS 2012. 

Thanks for this post:

Cannot install node modules that require compilation on Windows 7 x64/VS2012

npm install zmq --msvs_version=2015

Just add msvs_version=.... then you can compile with any version of visual studio. Remember to install windows SDK first.

A final reminder is

Nodejs cannot find installed module on Windows?

To use ZMQ globally, add an environment variable NODE_PATH=%AppData%\npm\node_modules


That's it. Enjoy ZMQ!