The computer on my desk at home runs Windows (XP SP3 at the moment) rather than my beloved NetBSD or a Linux variant. Of course my servers run real OSes, but I wanted to work on my desktop machine and so spent a while installing node.js, its package manager and associated packages under Cygwin, which is what makes programming on a Windows machine bearable for me. The node.js installation instructions cover Cygwin separately and the instructions there worked for me. However I had a problem using the Node.js Package Manager to install third-party modules. As described in this email thread, Cygwin pipelines into gzip can hang in certain environments. I spent hours rebooting, reinstalling and futzing around until I found that thread, which goes on to lay the blame on a “BLODA“. It turns out that certain antivirus applications can cause this, by hooking themselves into the system call invocation chain in a way which doesn’t actually work perfectly. I turned my AVG Antivirus Free (v11) off for 30 seconds during the installation of this particular package (called “request“) and the installation went like a dream.
A consequence of node.js’s youth is the immaturity of adjunct libraries for interaction with other services. Although HTTP is treated as a first-class application with built-in support, that support is primitive at this stage when compared with Ruby’s net/http. I’ve been exploring the available libraries for node, which for HTTP client applications include node-httpclient, node-get, node-http-digest, request and abstract-http-request of which the last two look particularly promising. None of them appear to offer cookie storage between requests, which is something I will need. At the moment I’m thinking of using one of the available key-value storage libraries which are available to store cookies.