Skip to content
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.

Half the issues here are installation fails. We need better documentation. #360

Open
3 tasks
ronkorving opened this issue Oct 14, 2014 · 21 comments
Open
3 tasks

Comments

@ronkorving
Copy link
Collaborator

Either:

  • people can't find what they need, but we do offer
  • we don't have the information people need
  • our documentation is outdated

Either way, this needs to be resolved, as it's wasted a lot of peoples' time.

@ronkorving
Copy link
Collaborator Author

I hope this is slightly resolved now, but I doubt we'll stop seeing tons of issues coming in. Leaving this open for now.

@skibz
Copy link
Contributor

skibz commented Dec 9, 2014

@ronkorving i might be able to help improve the docs a little. i've been using this module a bit over the past month or so. it should be kind of straight forward. i think it's just a case of looking over the examples and documenting anything undocumented, and anything that could be considered out of the ordinary.

@ronkorving
Copy link
Collaborator Author

Help is always much appreciated :)

@barrettr5
Copy link

I have been very impressed by the promise of ZeroMq. However, to make it work for our situation, we have to have a reliable binding for node.js. I have constructed a C++ prototype for that side of our communications. Now, I have tried for several days to create a binding for node without success. All of our C++ development is on Visual C++ 2012, for x64 on node v0.10.21. I am building on a Windows 2008 R2 server. The npm install had no chance of success. I then tried to build the binding.cc from scratch. I have collected and installed all the libraries and headers that I thought would be needed. I was able to get it to compile and link to a .node module. However, the module was somehow incomplete because it does not have a “socket” method. By the way, I have successfully built a few node addons in the past. Any suggestions?

@reqshark
Copy link
Contributor

if you got node v0.10 and ømq working on windows, next question:

can you npm install -g node-gyp or even just npm install node-gyp?

@barrettr5
Copy link

Bent,

Thank you for responding. Yes, I have installed node-gyp and made sure that it is the latest update. I have built other node addons with these files. I have also installed the pre-built Windows version of ZeroMQ which includes the headers and libraries for VC++ 2012. The ZeroMQ version is 4.0.4.

However, when I try to use node-gyp directly there are problems with the VC++ version and the SDK version and I don’t think it is picking up x64 instead of win32. Unfortunately, I am not very familiar with node-gyp configuration. I am using the header files and node.lib from the node-gyp installation.

When compiling and linking the binding.cc file in a VC++ project, I have had to make very few changes, mostly to remove warning about int64 mismatches. Since this my first encounter with NAN, the NAN constructs tends to obfuscate the flow of the code.

The error I get is:

var sock = zmq.socket(‘req’);
^
TypeError: Object # has no method ‘socket’
(the rest of the stack …)

From: Bent Cardan [mailto:notifications@github.com]
Sent: Tuesday, February 10, 2015 4:57 PM
To: JustinTulloss/zeromq.node
Cc: Robert Barrett
Subject: Re: [zeromq.node] Half the issues here are installation fails. We need better documentation. (#360)

if you got node v0.10 and ømq working on windows, next question:

can you npm install -g node-gyp or even just npm install node-gyp?


Reply to this email directly or view it on GitHubhttps://github.com//issues/360#issuecomment-73792666.

@barrettr5
Copy link

I have been analyzing the code, but I cannot see where the 'socket' function is declared or defined. I must be missing some piece of the code. I have uploaded my code to my public repro zeromq-node.

@kkoopa
Copy link
Contributor

kkoopa commented Feb 18, 2015

@barrettr5
Copy link

kkoopa; Thank you for the inspiration. I had already tried to run index.js several times without success. It could not find 'bindings' and zmq.node was in the wrong place. After your message, I did a search of my computer disks looking for 'bindings' and finally found it under the Windows 7.1 SDK directory. Evidently running npm in early Feb. had downloaded the code before crashing. I moved the entire node_modules out to be more accessible. Using what I had already learned, I was now able to run node-gyp successfully with only a few compiler warnings. I can now run index.js and my simple test js file. Finally, I can move on to actual development for our application.
One key that I eventually stumbled on was the need to use the GYP_MSVS_VERSION=2012 environment variable. That was necessary to make node-gyp work, but it did not help npm.

@reqshark
Copy link
Contributor

the key to node-gyp is python.

i recommend you use the anaconda python installer, and probably install cmake for good measure

@fed135
Copy link

fed135 commented Aug 14, 2015

Any update on the addon ? DevOps around the world would be reallly grateful.

@reqshark
Copy link
Contributor

resolved, check the readme

@ronkorving can we close this

@fed135
Copy link

fed135 commented Aug 14, 2015

You do have to install the ZMQ binaries separately.

From README:

 First install pkg-config and the ZeroMQ library.

What I understood from @barrettr5 's messages is that he was working on an addon to remove the need to install the binaries separately. Did I get this right ?

@reqshark
Copy link
Contributor

depends on the OS, we do that already for windows but not for unix

@ronkorving
Copy link
Collaborator Author

Yeah, the conversation was to add it one way or another to *nix.

@reqshark
Copy link
Contributor

I thought we decided we weren't doing that.. Is that something people want?

@ronkorving
Copy link
Collaborator Author

Not sure, it's been a while. Sorry :)

@kkoopa
Copy link
Contributor

kkoopa commented Aug 15, 2015

Bundling dependencies is generally not desirable. On Windows, however, it is more of a necessity.

@fed135
Copy link

fed135 commented Aug 15, 2015

Not having a clean, bundled install for linux (centOS, ubuntu) is one of the main reason why we are not using ZMQ in production. I would be glad to contribute anywhere I can to make that change.

@barrettr5
Copy link

fed135
I wish I could report better progress, but shortly after after making the breakthrough reported here, "wiser" people decided I had more important things to do. One of the problems is that we already have something that works, so there is little incentive to make it "better", at least til it breaks.

@jcrben
Copy link

jcrben commented Jun 20, 2016

In my case, the issue was that the zmq.node file was not being built in my docker container. The fix was to run it with --unsafe-perm (see this).
image

In the scrollback it is easy to miss the cannot run in wd message.
image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants