Skip to content


windows compatability #123

AlgoTrader opened this Issue · 12 comments

7 participants


Great library but cannot use it in Windows. There is no node-waf there. Can you please fix it?

npm WARN continuing anyway libxmljs@0.5.4 preuninstall: node-waf clean
npm WARN continuing anyway cmd "/c" "node-waf clean" failed with 1

npm ERR! libxmljs@0.5.4 install: node-waf configure build
npm ERR! cmd "/c" "node-waf configure build" failed with 1
npm ERR!
npm ERR! Failed at the libxmljs@0.5.4 install script.
npm ERR! This is most likely a problem with the libxmljs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-waf configure build
npm ERR! You can get their info via:
npm ERR! npm owner ls libxmljs
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Windows_NT 5.1.2600
npm ERR! command "C:\Program Files\nodejs\\node.exe" "C:\Program Files\nodejs\node_modules\n
pm\bin\npm-cli.js" "install" "betfair-sports-api"
npm ERR! cwd C:\Node
npm ERR! node -v v0.6.13
npm ERR! npm -v 1.1.9
npm ERR! message libxmljs@0.5.4 install: node-waf configure build
npm ERR! message cmd "/c" "node-waf configure build" failed with 1
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Node\npm-debug.log


I personally do not use windows (or have any boxes active with it). If you would like to provide a patch, we would probly accept it :)


bump ... I've got a project using libxmljs that I ultimately need to deploy on windows and I'd really like to avoid cygwin if at all possible. Any idea of level of effort?


I am not sure on the level of effort, you just have to have a go at it. I will not be able to fix this issue as I do not use windows.

My first suggestion would be to get a gyp build for the package going.


To use NPM one must have Visual Studio 2008/2010 installed, npm should run from Visual Studio prompt to compile libxmljs and ... There is still a problem - there is no libxml2 on windows. One can make a custom build of libxmljs bundled with build libxml2 and deploy it. I see no easy way to fix it, node-waf is just a pin of iceberg


Following the link to libxml2 -> Libxml2 is known to be very portable, the library should build and work without serious troubles on a variety of systems (Linux, Unix, Windows, CygWin, MacOS, MacOS X, RISC Os, OS/2, VMS, QNX, MVS, VxWorks, ...)

I've got a libxml2.dll on my win7. You can find it in here

Oh, sorry @BetfairTrader, you probably meant that you can't actually build is under Windows.


I can. I don't think it is good idea of bundling libxmljs with libxml2 . I need install libxml2 and that is not as simple as "zypper install libxml2-devel" on SUSE linux. I need to install Visual Studio C++ and run npm from the VS friendly command prompt, make shure libxml2 headers are visible and libxml2.lib is in linking path. Then I need to patch libxmljs to support VS C++ build. Too many troubles, isn't it?


closing due to inactivity. There is a new build system in place (gyp) that might be of more assistance. Patches are welcome for windows support :)


ok, so how do I do it on windows? node-gyp works for compiling things and, I can get binaries and such for libxml2. The binaries for windows don't come with the xml2-config utility though. I'm just not sure what to do here.

I found some information about xml2-config at and it says that it's a shell script. Obviously I can't run a shell script for linux so, if I wrote a script my system could execute, would I be able to compile this or am I just being naive?


Hey @matthewkastor :) I'm having the same problem, maybe you ran into a solution by now...?



Yes, the solution is to use something else. This project is a linux program that depends on node and other software. It is not compatible with windows.

xmldom is described as

"Fully compatible with W3C DOM level2; and some compatible with level3. support DOMParser and XMLSerializer interface such as in browser."

xpath is described as

"DOM 3 Xpath implemention and helper for node.js. xpath is xml engine agnostic but I recommend to use xmldom"

Also of note is jsdom which provides

"A JavaScript implementation of the W3C DOM."

It's basically a fully scriptable headless web browser. Depending on what you're trying to accomplish this might be more useful.

Since many windows users are introduced to libxml through php, the following unrelated package may be interesting

Let me know if that helps.



Thank you very much for your detailed reply! I will look into all of this.


Duplicate of #176. No promises, but watch that space.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.