Hot questions for Using ZeroMQ in npm

Question:

I found these two bindings of ZMQ for Node.js. It seems, that both offer an equivalent API. Does anyone know pros and/or cons?


Answer:

https://www.npmjs.com/package/zeromq points to this github repo https://github.com/zeromq/zeromq.js which is maintained by the official zeromq project.

If the api is equivalent then choose the project that has the most incentive to keep up to date and support customers (such as yourself).

In this case, use the more official client.

Question:

I tried npm install zmq and I got:

make: Entering directory '/home/lucas/dir/node_modules/zmq/build'
  CXX(target) Release/obj.target/zmq/binding.o
../binding.cc:28:17: fatal error: zmq.h: No such file or directory
compilation terminated.
zmq.target.mk:94: recipe for target 'Release/obj.target/zmq/binding.o' failed
make: *** [Release/obj.target/zmq/binding.o] Error 1
make: Leaving directory '/home/lucas/dir/node_modules/zmq/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Linux 4.4.0-59-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/lucas/dir/node_modules/zmq
gyp ERR! node -v v7.4.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
npm WARN projectName@1.0.0 No repository field.
npm ERR! Linux 4.4.0-59-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "zmq"
npm ERR! node v7.4.0
npm ERR! npm  v4.0.5
npm ERR! code ELIFECYCLE

npm ERR! zmq@2.15.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the zmq@2.15.3 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the zmq package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs zmq
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls zmq
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/lucas/dir/npm-debug.log

Here's the pastebin of that npm-debug.log:

http://pastebin.com/UGLDEWin

Does anybody have any idea of what's happening? Seems like error in the compilation or so. As you see, my nodejs is version 7.x, not an old one. And NPM is 4.x, should work, right?


Answer:

Try to:

sudo apt-get install build-essential checkinstall

then, relaunch npm install.

If it fails again, you can try to install node-gyp globally:

npm install -g node-gyp

Question:

I am getting this error when I am trying to install "zmq" through npm

  oem@saurabh:~/Desktop/watcher/messaging$ npm install zmq

> zmq@2.15.3 install /home/oem/Desktop/watcher/messaging/node_modules/zmq
> node-gyp rebuild

make: Entering directory '/home/oem/Desktop/watcher/messaging/node_modules/zmq/build'
  CXX(target) Release/obj.target/zmq/binding.o
../binding.cc:28:10: fatal error: zmq.h: No such file or directory
 #include <zmq.h>
          ^~~~~~~
compilation terminated.
zmq.target.mk:101: recipe for target 'Release/obj.target/zmq/binding.o' failed
make: *** [Release/obj.target/zmq/binding.o] Error 1
make: Leaving directory '/home/oem/Desktop/watcher/messaging/node_modules/zmq/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.15.0-39-generic
gyp ERR! command "/usr/bin/node" "/usr/local/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/oem/Desktop/watcher/messaging/node_modules/zmq
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN messaging@1.0.0 No description
npm WARN messaging@1.0.0 No repository field.
npm ERR! Linux 4.15.0-39-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "zmq"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! code ELIFECYCLE

npm ERR! zmq@2.15.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zmq@2.15.3 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the zmq package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs zmq
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls zmq
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/oem/Desktop/watcher/messaging/npm-debug.log

I am using linux,i have installed zmq & node-gyp globally then also it is giving same error again and again

What is happening here and what is node-gyp actually


Answer:

I had the same problem. Try to install zeromq instead of zmq. Zmq is deprecated, as you can check here: https://github.com/zeromq/zeromq.js/issues/123

Question:

I am trying to install node module zmq

I have referred to this https://github.com/JustinTulloss/zeromq.node/wiki/Installation#installation-on-windows

However i get this error while installing the module

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files (x86)\\nodejs\\\\node.exe',
1 verbose cli   'C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'install',
1 verbose cli   'zmq' ]
2 info using npm@2.5.1
3 info using node@v0.12.0
4 verbose node symlink C:\Program Files (x86)\nodejs\\node.exe
5 silly cache add args [ 'zmq', null ]
6 verbose cache add spec zmq
7 silly cache add parsed spec { raw: 'zmq',
7 silly cache add   scope: null,
7 silly cache add   name: 'zmq',
7 silly cache add   rawSpec: '',
7 silly cache add   spec: '*',
7 silly cache add   type: 'range' }
8 verbose addNamed zmq@*
9 silly addNamed semver.valid null
10 silly addNamed semver.validRange *
11 silly addNameRange { name: 'zmq', range: '*', hasData: false }
12 silly mapToRegistry name zmq
13 silly mapToRegistry using default registry

18 verbose request no auth needed
19 info attempt registry request try #1 at 7:10:27 PM
20 verbose request id 102e05e7c26a7abd
21 verbose etag "14FLT2EUEFQI6UYYC2PTSFZA2"
22 http request GET http://registry.npmjs.org/zmq
23 http 304 http://registry.npmjs.org/zmq
24 silly get cb [ 304,
24 silly get   { date: 'Tue, 12 May 2015 13:42:20 GMT',
24 silly get     via: '1.1 varnish',
24 silly get     'cache-control': 'max-age=60',
24 silly get     etag: '"14FLT2EUEFQI6UYYC2PTSFZA2"',
24 silly get     age: '0',
24 silly get     connection: 'keep-alive',
24 silly get     'x-served-by': 'cache-sn86-SIN',
24 silly get     'x-cache': 'MISS',
24 silly get     'x-cache-hits': '0',
24 silly get     'x-timer': 'S1431438140.278656,VS0,VE241',
24 silly get     vary: 'Accept' } ]
25 verbose etag http://registry.npmjs.org/zmq from cache
26 verbose get saving zmq to C:\Users\user1\AppData\Roaming\npm-cache\registry.npmjs.org\zmq\.cache.json
27 silly addNameRange number 2 { name: 'zmq', range: '*', hasData: true }
28 silly addNameRange versions [ 'zmq',
28 silly addNameRange   [ '1.0.0',

28 silly addNameRange     '2.11.0' ] ]
29 verbose addNamed zmq@2.11.0

33 verbose afterAdd C:\Users\user1\AppData\Roaming\npm-cache\zmq\2.11.0\package\package.json not in flight; writing
34 verbose afterAdd C:\Users\user1\AppData\Roaming\npm-cache\zmq\2.11.0\package\package.json written
35 silly install resolved [ { name: 'zmq',
35 silly install resolved     version: '2.11.0',
35 silly install resolved     description: 'Bindings for node.js and io.js to ZeroMQ',
35 silly install resolved     main: 'index',
35 silly install resolved     repository:
35 silly install resolved      { type: 'git',
35 silly install resolved        url: 'http://github.com/JustinTulloss/zeromq.node.git' },
35 silly install resolved     dependencies: { nan: '~1.5.0', bindings: '~1.1.1' },
35 silly install resolved     devDependencies: { should: '2.1.x', semver: '~4.1.1', mocha: '~1.13.0' },
35 silly install resolved     engines: { node: '>=0.8' },
35 silly install resolved     scripts: { test: 'make test', install: 'node-gyp rebuild' },
35 silly install resolved     keywords:
35 silly install resolved      [ 'zeromq',
35 silly install resolved        'zmq',
35 silly install resolved        '0mq',
35 silly install resolved        'ømq',
35 silly install resolved        'libzmq',
35 silly install resolved        'native',
35 silly install resolved        'binding',
35 silly install resolved        'addon' ],
35 silly install resolved     author:
35 silly install resolved      { name: 'Justin Tulloss',
35 silly install resolved        email: 'justin.tulloss@gmail.com',
35 silly install resolved        url: 'http://justin.harmonize.fm' },
35 silly install resolved     contributors:
35 silly install resolved      [ [Object],

35 silly install resolved        [Object] ],
35 silly install resolved     gypfile: true,
35 silly install resolved     gitHead: 'bfd80e374ee85e640e132f39e1e693955d6154ce',
35 silly install resolved     bugs: { url: 'https://github.com/JustinTulloss/zeromq.node/issues' },
35 silly install resolved     homepage: 'https://github.com/JustinTulloss/zeromq.node',
35 silly install resolved     _id: 'zmq@2.11.0',
35 silly install resolved     _shasum: '4511aee4b57109742eb8c51aa4c170211843e7cd',
35 silly install resolved     _from: 'zmq@*',
35 silly install resolved     _npmVersion: '2.5.1',
35 silly install resolved     _nodeVersion: '0.12.1',
35 silly install resolved     _npmUser: { name: 'ronkorving', email: 'ron@ronkorving.nl' },
35 silly install resolved     maintainers: [ [Object], [Object], [Object] ],
35 silly install resolved     dist:
35 silly install resolved      { shasum: '4511aee4b57109742eb8c51aa4c170211843e7cd',
35 silly install resolved        tarball: 'http://registry.npmjs.org/zmq/-/zmq-2.11.0.tgz' },
35 silly install resolved     directories: {},
35 silly install resolved     _resolved: 'http://registry.npmjs.org/zmq/-/zmq-2.11.0.tgz',
35 silly install resolved     readme: 'ERROR: No README data found!' } ]
36 info install zmq@2.11.0 into C:\Windows\system32
37 info installOne zmq@2.11.0
38 verbose installOne of zmq to C:\Windows\system32 not in flight; installing
39 verbose lock using C:\Users\user1\AppData\Roaming\npm-cache\_locks\zmq-006e6cc10e519e93.lock for C:\Windows\system32\node_modules\zmq
40 silly install write writing zmq 2.11.0 to C:\Windows\system32\node_modules\zmq
41 silly cache addNamed cb zmq@2.11.0
42 verbose unbuild node_modules\zmq
43 verbose gentlyRm vacuuming C:\Windows\system32\node_modules\zmq
44 verbose tar unpack C:\Users\user1\AppData\Roaming\npm-cache\zmq\2.11.0\package.tgz
45 verbose tar unpacking to C:\Windows\system32\node_modules\zmq
46 verbose gentlyRm vacuuming C:\Windows\system32\node_modules\zmq
47 silly gunzTarPerm modes [ '777', '666' ]
48 silly gunzTarPerm extractEntry package.json

66 silly gunzTarPerm extractEntry examples/dealer_router.js
67 silly gunzTarPerm modified mode [ 'examples/dealer_router.js', 420, 438 ]
68 silly gunzTarPerm extractEntry examples/pub_sub.js
69 silly gunzTarPerm modified mode [ 'examples/pub_sub.js', 420, 438 ]

82 silly gunzTarPerm extractEntry examples/devices/queue.js
83 silly gunzTarPerm modified mode [ 'examples/devices/queue.js', 420, 438 ]
84 silly gunzTarPerm extractEntry examples/devices/streamer.js
85 silly gunzTarPerm modified mode [ 'examples/devices/streamer.js', 420, 438 ]

88 silly gunzTarPerm extractEntry examples/workers/worker.js
89 silly gunzTarPerm modified mode [ 'examples/workers/worker.js', 420, 438 ]
90 silly gunzTarPerm extractEntry lib/index.js
91 silly gunzTarPerm modified mode [ 'lib/index.js', 420, 438 ]
92 silly gunzTarPerm extractEntry test/context.js
93 silly gunzTarPerm modified mode [ 'test/context.js', 420, 438 ]
94 silly gunzTarPerm extractEntry test/socket.monitor.js
95 silly gunzTarPerm modified mode [ 'test/socket.monitor.js', 420, 438 ]
96 silly gunzTarPerm extractEntry test/socket.pair.js
97 silly gunzTarPerm modified mode [ 'test/socket.pair.js', 420, 438 ]
98 silly gunzTarPerm extractEntry test/socket.pub-sub.js
99 silly gunzTarPerm modified mode [ 'test/socket.pub-sub.js', 420, 438 ]
100 silly gunzTarPerm extractEntry test/socket.push-pull.js
101 silly gunzTarPerm modified mode [ 'test/socket.push-pull.js', 420, 438 ]
102 silly gunzTarPerm extractEntry test/socket.messages.js
103 silly gunzTarPerm modified mode [ 'test/socket.messages.js', 420, 438 ]
104 silly gunzTarPerm extractEntry test/socket.router.js
105 silly gunzTarPerm modified mode [ 'test/socket.router.js', 420, 438 ]
106 silly gunzTarPerm extractEntry test/socket.stream.js
107 silly gunzTarPerm modified mode [ 'test/socket.stream.js', 420, 438 ]
108 silly gunzTarPerm extractEntry test/socket.unbind.js
109 silly gunzTarPerm modified mode [ 'test/socket.unbind.js', 420, 438 ]
110 silly gunzTarPerm extractEntry test/socket.xpub-xsub.js
111 silly gunzTarPerm modified mode [ 'test/socket.xpub-xsub.js', 420, 438 ]
112 silly gunzTarPerm extractEntry test/socket.zap.js
113 silly gunzTarPerm modified mode [ 'test/socket.zap.js', 420, 438 ]
114 silly gunzTarPerm extractEntry test/socket.js
115 silly gunzTarPerm modified mode [ 'test/socket.js', 420, 438 ]
116 silly gunzTarPerm extractEntry test/zap.js
117 silly gunzTarPerm modified mode [ 'test/zap.js', 420, 438 ]
118 silly gunzTarPerm extractEntry test/socket.events.js
119 silly gunzTarPerm modified mode [ 'test/socket.events.js', 420, 438 ]
120 silly gunzTarPerm extractEntry test/zmq_proxy.js
121 silly gunzTarPerm modified mode [ 'test/zmq_proxy.js', 420, 438 ]
122 silly gunzTarPerm extractEntry test/zmq_proxy.xpub-xsub.js
123 silly gunzTarPerm modified mode [ 'test/zmq_proxy.xpub-xsub.js', 420, 438 ]
124 silly gunzTarPerm extractEntry test/zmq_proxy.push-pull.js
125 silly gunzTarPerm modified mode [ 'test/zmq_proxy.push-pull.js', 420, 438 ]
126 silly gunzTarPerm extractEntry test/gc.js
127 silly gunzTarPerm modified mode [ 'test/gc.js', 420, 438 ]
128 silly gunzTarPerm extractEntry test/zmq_proxy.router-dealer.js
129 silly gunzTarPerm modified mode [ 'test/zmq_proxy.router-dealer.js', 420, 438 ]
130 silly gunzTarPerm extractEntry test/exports.js
131 silly gunzTarPerm modified mode [ 'test/exports.js', 420, 438 ]
132 silly gunzTarPerm extractEntry test/zmq_proxy.xrep-xreq.js
133 silly gunzTarPerm modified mode [ 'test/zmq_proxy.xrep-xreq.js', 420, 438 ]
134 silly gunzTarPerm extractEntry test/socket.req-rep.js
135 silly gunzTarPerm modified mode [ 'test/socket.req-rep.js', 420, 438 ]
136 silly gunzTarPerm extractEntry test/mocha.opts
137 silly gunzTarPerm modified mode [ 'test/mocha.opts', 420, 438 ]
138 silly gunzTarPerm extractEntry Makefile
139 silly gunzTarPerm modified mode [ 'Makefile', 420, 438 ]
140 silly gunzTarPerm extractEntry perf/local_lat.js
141 silly gunzTarPerm modified mode [ 'perf/local_lat.js', 420, 438 ]
142 silly gunzTarPerm extractEntry perf/local_thr.js
143 silly gunzTarPerm modified mode [ 'perf/local_thr.js', 420, 438 ]
144 silly gunzTarPerm extractEntry perf/remote_lat.js
145 silly gunzTarPerm modified mode [ 'perf/remote_lat.js', 420, 438 ]
146 silly gunzTarPerm extractEntry perf/remote_thr.js
147 silly gunzTarPerm modified mode [ 'perf/remote_thr.js', 420, 438 ]
148 silly gunzTarPerm extractEntry windows/include/zmq.h
149 silly gunzTarPerm modified mode [ 'windows/include/zmq.h', 420, 438 ]
150 silly gunzTarPerm extractEntry windows/include/zmq_utils.h
151 silly gunzTarPerm modified mode [ 'windows/include/zmq_utils.h', 420, 438 ]
152 silly gunzTarPerm extractEntry windows/lib/x64/libzmq-v100-mt-3_2_2.dll
153 silly gunzTarPerm modified mode [ 'windows/lib/x64/libzmq-v100-mt-3_2_2.dll', 420, 438 ]
154 silly gunzTarPerm extractEntry windows/lib/x64/libzmq-v100-mt-3_2_2.lib
155 silly gunzTarPerm modified mode [ 'windows/lib/x64/libzmq-v100-mt-3_2_2.lib', 420, 438 ]
156 silly gunzTarPerm extractEntry windows/lib/x86/libzmq-v100-mt-3_2_2.dll
157 silly gunzTarPerm modified mode [ 'windows/lib/x86/libzmq-v100-mt-3_2_2.dll', 420, 438 ]
158 silly gunzTarPerm extractEntry windows/lib/x86/libzmq-v100-mt-3_2_2.lib
159 silly gunzTarPerm modified mode [ 'windows/lib/x86/libzmq-v100-mt-3_2_2.lib', 420, 438 ]
160 info preinstall zmq@2.11.0
161 silly prepareForInstallMany adding nan@~1.5.0 from zmq dependencies
162 silly prepareForInstallMany adding bindings@~1.1.1 from zmq dependencies
163 silly cache add args [ 'nan@~1.5.0', null ]
164 verbose cache add spec nan@~1.5.0
165 silly cache add args [ 'bindings@~1.1.1', null ]
166 verbose cache add spec bindings@~1.1.1
167 silly cache add parsed spec { raw: 'nan@~1.5.0',
167 silly cache add   scope: null,
167 silly cache add   name: 'nan',
167 silly cache add   rawSpec: '~1.5.0',
167 silly cache add   spec: '>=1.5.0 <1.6.0',
167 silly cache add   type: 'range' }
168 verbose addNamed nan@>=1.5.0 <1.6.0
169 silly addNamed semver.valid null
170 silly addNamed semver.validRange >=1.5.0 <1.6.0
171 silly addNameRange { name: 'nan', range: '>=1.5.0 <1.6.0', hasData: false }
172 silly mapToRegistry name nan
173 silly mapToRegistry using default registry
174 silly mapToRegistry registry http://registry.npmjs.org/
175 silly mapToRegistry uri http://registry.npmjs.org/nan
176 verbose addNameRange registry:http://registry.npmjs.org/nan not in flight; fetching
177 silly cache add parsed spec { raw: 'bindings@~1.1.1',
177 silly cache add   scope: null,
177 silly cache add   name: 'bindings',
177 silly cache add   rawSpec: '~1.1.1',
177 silly cache add   spec: '>=1.1.1 <1.2.0',
177 silly cache add   type: 'range' }
178 verbose addNamed bindings@>=1.1.1 <1.2.0
179 silly addNamed semver.valid null
180 silly addNamed semver.validRange >=1.1.1 <1.2.0
181 silly addNameRange { name: 'bindings', range: '>=1.1.1 <1.2.0', hasData: false }
182 silly mapToRegistry name bindings
183 silly mapToRegistry using default registry
184 silly mapToRegistry registry http://registry.npmjs.org/
185 silly mapToRegistry uri http://registry.npmjs.org/bindings
186 verbose addNameRange registry:http://registry.npmjs.org/bindings not in flight; fetching
187 verbose request uri http://registry.npmjs.org/bindings
188 verbose request no auth needed
189 info attempt registry request try #1 at 7:10:28 PM
190 verbose etag "9RK4S5X0OXSOK2HUD8YR6PWNW"
191 http request GET http://registry.npmjs.org/bindings
192 verbose request uri http://registry.npmjs.org/nan
193 verbose request no auth needed
194 info attempt registry request try #1 at 7:10:28 PM
195 verbose etag "D9X1WVB37H5NYMOI61FHEOYM0"
196 http request GET http://registry.npmjs.org/nan
197 http 304 http://registry.npmjs.org/bindings
198 silly get cb [ 304,
198 silly get   { date: 'Tue, 12 May 2015 13:42:20 GMT',
198 silly get     via: '1.1 varnish',
198 silly get     'cache-control': 'max-age=60',
198 silly get     etag: '"9RK4S5X0OXSOK2HUD8YR6PWNW"',
198 silly get     age: '49',
198 silly get     connection: 'keep-alive',
198 silly get     'x-served-by': 'cache-sn86-SIN',
198 silly get     'x-cache': 'HIT',
198 silly get     'x-cache-hits': '2',
198 silly get     'x-timer': 'S1431438140.818974,VS0,VE0',
198 silly get     vary: 'Accept' } ]
199 verbose etag http://registry.npmjs.org/bindings from cache
200 verbose get saving bindings to C:\Users\user1\AppData\Roaming\npm-cache\registry.npmjs.org\bindings\.cache.json
201 silly addNameRange number 2 { name: 'bindings', range: '>=1.1.1 <1.2.0', hasData: true }
202 silly addNameRange versions [ 'bindings',
202 silly addNameRange   [ '0.0.1',

202 silly addNameRange     '1.2.1' ] ]
203 verbose addNamed bindings@1.1.1
204 silly addNamed semver.valid 1.1.1
205 silly addNamed semver.validRange 1.1.1
206 silly cache afterAdd bindings@1.1.1
207 verbose afterAdd C:\Users\user1\AppData\Roaming\npm-cache\bindings\1.1.1\package\package.json not in flight; writing
208 verbose afterAdd C:\Users\user1\AppData\Roaming\npm-cache\bindings\1.1.1\package\package.json written
209 http 304 http://registry.npmjs.org/nan
210 silly get cb [ 304,
210 silly get   { date: 'Tue, 12 May 2015 13:42:20 GMT',
210 silly get     via: '1.1 varnish',
210 silly get     'cache-control': 'max-age=60',
210 silly get     etag: '"D9X1WVB37H5NYMOI61FHEOYM0"',
210 silly get     age: '39',
210 silly get     connection: 'keep-alive',
210 silly get     'x-served-by': 'cache-sn88-SIN',
210 silly get     'x-cache': 'HIT',
210 silly get     'x-cache-hits': '6',
210 silly get     'x-timer': 'S1431438140.887561,VS0,VE0',
210 silly get     vary: 'Accept' } ]
211 verbose etag http://registry.npmjs.org/nan from cache
212 verbose get saving nan to C:\Users\user1\AppData\Roaming\npm-cache\registry.npmjs.org\nan\.cache.json
213 silly addNameRange number 2 { name: 'nan', range: '>=1.5.0 <1.6.0', hasData: true }
214 silly addNameRange versions [ 'nan',

214 silly addNameRange     '1.8.4' ] ]
215 verbose addNamed nan@1.5.3
216 silly addNamed semver.valid 1.5.3
217 silly addNamed semver.validRange 1.5.3
218 silly cache afterAdd nan@1.5.3
219 verbose afterAdd C:\Users\user1\AppData\Roaming\npm-cache\nan\1.5.3\package\package.json not in flight; writing
220 verbose afterAdd C:\Users\user1\AppData\Roaming\npm-cache\nan\1.5.3\package\package.json written
221 silly install resolved [ { name: 'bindings',
221 silly install resolved     description: 'Helper module for loading your native module\'s .node file',
221 silly install resolved     keywords: [ 'native', 'addon', 'bindings', 'gyp', 'waf', 'c', 'c++' ],
221 silly install resolved     version: '1.1.1',
221 silly install resolved     author:
221 silly install resolved      { name: 'Nathan Rajlich',
221 silly install resolved        email: 'nathan@tootallnate.net',
221 silly install resolved        url: 'http://tootallnate.net' },
221 silly install resolved     repository:
221 silly install resolved      { type: 'git',
221 silly install resolved        url: 'git://github.com/TooTallNate/node-bindings.git' },
221 silly install resolved     main: './bindings.js',
221 silly install resolved     bugs: { url: 'https://github.com/TooTallNate/node-bindings/issues' },
221 silly install resolved     _id: 'bindings@1.1.1',
221 silly install resolved     dist:
221 silly install resolved      { shasum: '951f7ae010302ffc50b265b124032017ed2bf6f3',
221 silly install resolved        tarball: 'http://registry.npmjs.org/bindings/-/bindings-1.1.1.tgz' },
221 silly install resolved     _from: 'bindings@>=1.1.1 <1.2.0',
221 silly install resolved     _npmVersion: '1.3.2',
221 silly install resolved     _npmUser: { name: 'tootallnate', email: 'nathan@tootallnate.net' },
221 silly install resolved     maintainers: [ [Object], [Object] ],
221 silly install resolved     directories: {},
221 silly install resolved     _shasum: '951f7ae010302ffc50b265b124032017ed2bf6f3',
221 silly install resolved     _resolved: 'http://registry.npmjs.org/bindings/-/bindings-1.1.1.tgz',
221 silly install resolved     readme: 'ERROR: No README data found!',
221 silly install resolved     homepage: 'https://github.com/TooTallNate/node-bindings' },
221 silly install resolved   { name: 'nan',
221 silly install resolved     version: '1.5.3',
221 silly install resolved     description: 'Native Abstractions for Node.js: C++ header for Node 0.8->0.12 compatibility',
221 silly install resolved     main: 'include_dirs.js',
221 silly install resolved     repository: { type: 'git', url: 'git://github.com/rvagg/nan.git' },
221 silly install resolved     scripts:
221 silly install resolved      { test: 'tap --gc test/js/*-test.js',
221 silly install resolved        'rebuild-tests': 'node-gyp rebuild --directory test' },
221 silly install resolved     contributors:

221 silly install resolved     devDependencies:
221 silly install resolved      { bindings: '~1.2.1',
221 silly install resolved        'node-gyp': '~1.0.2',
221 silly install resolved        tap: '~0.5.0',
221 silly install resolved        xtend: '~4.0.0' },
221 silly install resolved     license: 'MIT',
221 silly install resolved     gitHead: '28ea7e1b769f790c69deaf141b47e4d41e176e8b',
221 silly install resolved     bugs: { url: 'https://github.com/rvagg/nan/issues' },
221 silly install resolved     homepage: 'https://github.com/rvagg/nan',
221 silly install resolved     _id: 'nan@1.5.3',
221 silly install resolved     _shasum: '4cd0ecc133b7b0700a492a646add427ae8a318eb',
221 silly install resolved     _from: 'nan@>=1.5.0 <1.6.0',
221 silly install resolved     _npmVersion: '2.1.18',
221 silly install resolved     _nodeVersion: '1.0.3',
221 silly install resolved     _npmUser: { name: 'rvagg', email: 'rod@vagg.org' },
221 silly install resolved     maintainers: [ [Object], [Object] ],
221 silly install resolved     dist:
221 silly install resolved      { shasum: '4cd0ecc133b7b0700a492a646add427ae8a318eb',
221 silly install resolved        tarball: 'http://registry.npmjs.org/nan/-/nan-1.5.3.tgz' },
221 silly install resolved     directories: {},
221 silly install resolved     _resolved: 'http://registry.npmjs.org/nan/-/nan-1.5.3.tgz',
221 silly install resolved     readme: 'ERROR: No README data found!' } ]
222 info install bindings@1.1.1 into C:\Windows\system32\node_modules\zmq
223 info install nan@1.5.3 into C:\Windows\system32\node_modules\zmq
224 info installOne bindings@1.1.1
225 verbose installOne of bindings to C:\Windows\system32\node_modules\zmq not in flight; installing
226 info installOne nan@1.5.3
227 verbose installOne of nan to C:\Windows\system32\node_modules\zmq not in flight; installing
228 verbose lock using C:\Users\user1\AppData\Roaming\npm-cache\_locks\bindings-42203150de07bd2d.lock for C:\Windows\system32\node_modules\zmq\node_modules\bindings
229 silly install write writing bindings 1.1.1 to C:\Windows\system32\node_modules\zmq\node_modules\bindings
230 silly cache addNamed cb bindings@1.1.1
231 verbose unbuild node_modules\zmq\node_modules\bindings
232 verbose lock using C:\Users\user1\AppData\Roaming\npm-cache\_locks\nan-d5557fbe71503ac3.lock for C:\Windows\system32\node_modules\zmq\node_modules\nan
233 silly install write writing nan 1.5.3 to C:\Windows\system32\node_modules\zmq\node_modules\nan
234 silly cache addNamed cb nan@1.5.3
235 verbose unbuild node_modules\zmq\node_modules\nan
236 verbose gentlyRm vacuuming C:\Windows\system32\node_modules\zmq\node_modules\bindings
237 verbose tar unpack C:\Users\user1\AppData\Roaming\npm-cache\bindings\1.1.1\package.tgz
238 verbose tar unpacking to C:\Windows\system32\node_modules\zmq\node_modules\bindings
239 verbose gentlyRm vacuuming C:\Windows\system32\node_modules\zmq\node_modules\bindings
240 verbose gentlyRm vacuuming C:\Windows\system32\node_modules\zmq\node_modules\nan
241 silly gunzTarPerm modes [ '777', '666' ]
242 verbose tar unpack C:\Users\user1\AppData\Roaming\npm-cache\nan\1.5.3\package.tgz
243 verbose tar unpacking to C:\Windows\system32\node_modules\zmq\node_modules\nan
244 verbose gentlyRm vacuuming C:\Windows\system32\node_modules\zmq\node_modules\nan
245 silly gunzTarPerm modes [ '777', '666' ]
246 silly gunzTarPerm extractEntry package.json
247 silly gunzTarPerm modified mode [ 'package.json', 420, 438 ]
248 silly gunzTarPerm extractEntry package.json
249 silly gunzTarPerm modified mode [ 'package.json', 436, 438 ]
250 silly gunzTarPerm extractEntry README.md
251 silly gunzTarPerm modified mode [ 'README.md', 420, 438 ]
252 silly gunzTarPerm extractEntry bindings.js
253 silly gunzTarPerm modified mode [ 'bindings.js', 420, 438 ]
254 silly gunzTarPerm extractEntry README.md
255 silly gunzTarPerm modified mode [ 'README.md', 436, 438 ]
256 silly gunzTarPerm extractEntry include_dirs.js
257 silly gunzTarPerm modified mode [ 'include_dirs.js', 420, 438 ]
258 silly gunzTarPerm extractEntry LICENSE.md
259 silly gunzTarPerm modified mode [ 'LICENSE.md', 436, 438 ]
260 silly gunzTarPerm extractEntry .dntrc
261 silly gunzTarPerm modified mode [ '.dntrc', 436, 438 ]
262 silly gunzTarPerm extractEntry appveyor.yml
263 silly gunzTarPerm modified mode [ 'appveyor.yml', 436, 438 ]
264 silly gunzTarPerm extractEntry nan.h
265 silly gunzTarPerm modified mode [ 'nan.h', 436, 438 ]
266 silly gunzTarPerm extractEntry nan_implementation_12_inl.h
267 silly gunzTarPerm modified mode [ 'nan_implementation_12_inl.h', 436, 438 ]
268 silly gunzTarPerm extractEntry nan_implementation_pre_12_inl.h
269 silly gunzTarPerm modified mode [ 'nan_implementation_pre_12_inl.h', 436, 438 ]
270 silly gunzTarPerm extractEntry nan_new.h
271 silly gunzTarPerm modified mode [ 'nan_new.h', 436, 438 ]
272 info preinstall bindings@1.1.1
273 silly install resolved []
274 verbose about to build C:\Windows\system32\node_modules\zmq\node_modules\bindings
275 info build C:\Windows\system32\node_modules\zmq\node_modules\bindings
276 verbose linkStuff [ false,

276 verbose linkStuff   'C:\\Windows\\system32\\node_modules\\zmq\\node_modules' ]
277 info linkStuff bindings@1.1.1
278 verbose linkBins bindings@1.1.1
279 verbose linkMans bindings@1.1.1
280 verbose rebuildBundles bindings@1.1.1
281 info install bindings@1.1.1
282 info postinstall bindings@1.1.1
283 verbose unlock done using C:\Users\user1\AppData\Roaming\npm-cache\_locks\bindings-42203150de07bd2d.lock for C:\Windows\system32\node_modules\zmq\node_modules\bindings
284 silly gunzTarPerm extractEntry CHANGELOG.md
285 silly gunzTarPerm modified mode [ 'CHANGELOG.md', 436, 438 ]
286 info preinstall nan@1.5.3
287 silly install resolved []
288 verbose about to build C:\Windows\system32\node_modules\zmq\node_modules\nan
289 info build C:\Windows\system32\node_modules\zmq\node_modules\nan
'C:\\Windows\\system32\\node_modules\\zmq\\node_modules' ]
291 info linkStuff nan@1.5.3
292 verbose linkBins nan@1.5.3
293 verbose linkMans nan@1.5.3
294 verbose rebuildBundles nan@1.5.3
295 info install nan@1.5.3
296 info postinstall nan@1.5.3
297 verbose unlock done using C:\Users\user1\AppData\Roaming\npm-cache\_locks\nan-d5557fbe71503ac3.lock for C:\Windows\system32\node_modules\zmq\node_modules\nan
298 verbose about to build C:\Windows\system32\node_modules\zmq
299 info build C:\Windows\system32\node_modules\zmq
300 verbose linkStuff [ false, false, false, 'C:\\Windows\\system32\\node_modules' ]
301 info linkStuff zmq@2.11.0

304 verbose rebuildBundles zmq@2.11.0
305 verbose rebuildBundles [ 'bindings', 'nan' ]
306 info install zmq@2.11.0
307 verbose unsafe-perm in lifecycle true
308 info zmq@2.11.0 Failed to exec install script
309 verbose unlock done using C:\Users\user1\AppData\Roaming\npm-cache\_locks\zmq-006e6cc10e519e93.lock for C:\Windows\system32\node_modules\zmq
310 verbose stack Error: zmq@2.11.0 install: `node-gyp rebuild`
310 verbose stack Exit status 1
310 verbose stack     at EventEmitter.<anonymous> (C:\Program Files (x86)\nodejs\node_modules\npm\lib\utils\lifecycle.js:213:16)
310 verbose stack     at EventEmitter.emit (events.js:110:17)
310 verbose stack     at ChildProcess.<anonymous> (C:\Program Files (x86)\nodejs\node_modules\npm\lib\utils\spawn.js:14:12)
310 verbose stack     at ChildProcess.emit (events.js:110:17)
310 verbose stack     at maybeClose (child_process.js:1008:16)
310 verbose stack     at Process.ChildProcess._handle.onexit (child_process.js:1080:5)
311 verbose pkgid zmq@2.11.0
312 verbose cwd C:\Windows\system32
313 error Windows_NT 6.1.7601
314 error argv "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "zmq"
315 error node v0.12.0
316 error npm  v2.5.1
317 error code ELIFECYCLE
318 error zmq@2.11.0 install: `node-gyp rebuild`
318 error Exit status 1
319 error Failed at the zmq@2.11.0 install script 'node-gyp rebuild'.
319 error This is most likely a problem with the zmq package,
319 error not with npm itself.
319 error Tell the author that this fails on your system:
319 error     node-gyp rebuild
319 error You can get their info via:
319 error     npm owner ls zmq
319 error There is likely additional logging output above.
320 verbose exit [ 1, true ]
321 verbose unbuild node_modules\zmq
322 info preuninstall zmq@2.11.0
323 info uninstall zmq@2.11.0
324 verbose unbuild rmStuff zmq@2.11.0 from C:\Windows\system32\node_modules
325 info postuninstall zmq@2.11.0
326 verbose gentlyRm vacuuming C:\Windows\system32\node_modules\zmq
327 silly gentlyRm purging C:\Windows\system32\node_modules\zmq
328 silly gentlyRm quitting because other entries in     C:\Windows\system32\node_modules


NOTE : I have removed some redundant messages as the post was going above the word limit. Could someone please suggest where I am going wrong. Thanks


Answer:

You're in a bit of a node/zmq ghetto on Windows, not nearly as much activity as on Linux, however I did find this under the issues on the github page for the ZMQ node binding:

error trying to install ZeroMQ on Windows 7 by running “npm install zmq”. #415

The recommendations:

  1. first install cmake, then install the anaconda version of Python. Use the github shell as your interface when installing, and make sure ZMQ is installed correctly
  2. You can also compile directly from source using Visual Studio or another compiler
  3. Someone else suggests using Microsoft Windows SDK v7.1 as your shell interface when installing ZMQ (make sure you've set up your PYTHON environment variable appropriately).

Here's some more conversation that might help that slightly expands on the above. Here's the full list of issues that mention Windows at all.

In my experience on Linux, this boils down to one of two things:

  • Permissions issues
  • Python Version issues (make sure you're referencing the correct version of Python for the build tools).