During the last release of the Node.js SDK, I was unable to get libcouchbase to build on some platforms under gyp without manually specifying the NI_MAXHOST and NI_MAXSERV values manually. I spent a bit of time confirming the appropriate headers and defines were being used. Ended up needing to resort to adding those defines within hostlist.h. I believe there is some sort of include chain that's preventing the appropriate inclusion of the header for those defines.
#define NI_MAXHOST 1025
#define NI_MAXSERV 32