在windows上安装node-xmpp-bosh和nodejs

嗨,我是新的nodejs字,我使用Windows版本。 我想像安装说明一样安装我的node-xmpp-bosh服务器

Go to the directory where you want to install node-xmpp-bosh (for a local install and move to setp-9) or follow step-8 $ cd ~/ $ npm install node-xmpp-bosh $ node node_modules/node-xmpp-bosh/run-server.js 8. Install globally and run $ npm install node-xmpp-bosh -g $ bosh-server 

但是在$ npm install node-xmpp-bosh没有安装完成,这是nmp的日志文件:

  info it worked if it ends with ok ... info node-expat@1.4.4 Failed to exec install script ERR! error installing node-expat@1.4.4 info unbuild C:\Program Files\nodejs\node_modules\node-xmpp-bosh\node_modules\node-expat verbose from cache C:\Program Files\nodejs\node_modules\node-xmpp-bosh\node_modules\node-expat\package.json info preuninstall node-expat@1.4.4 info uninstall node-expat@1.4.4 verbose unbuild node-expat@1.4.4 [ false, verbose unbuild node-expat@1.4.4 'C:\\Program Files\\nodejs\\node_modules', verbose unbuild node-expat@1.4.4 'C:\\Program Files\\nodejs\\node_modules\\node-xmpp-bosh\\node_modules' ] info postuninstall node-expat@1.4.4 verbose installOne cb node-expat@1.4.4 verbose about to build C:\Program Files\nodejs\node_modules\node-xmpp-bosh ERR! error installing node-xmpp-bosh@0.5.6 info unbuild C:\Program Files\nodejs\node_modules\node-xmpp-bosh verbose from cache C:\Program Files\nodejs\node_modules\node-xmpp-bosh\package.json info preuninstall node-xmpp-bosh@0.5.6 info uninstall node-xmpp-bosh@0.5.6 verbose unbuild node-xmpp-bosh@0.5.6 [ true, verbose unbuild node-xmpp-bosh@0.5.6 'C:\\Program Files\\nodejs\\node_modules', verbose unbuild node-xmpp-bosh@0.5.6 'C:\\Program Files\\nodejs\\node_modules' ] verbose binRoot [ 'C:\\Program Files\\nodejs\\node_modules\\.bin', verbose binRoot { 'bosh-server': './run-server.js' } ] info postuninstall node-xmpp-bosh@0.5.6 ERR! error rolling back node-xmpp-bosh@0.5.6 Error: UNKNOWN, unknown error 'C:\Program Files\nodejs\node_modules\node-xmpp-bosh\node_modules\websocket' verbose installOne cb node-xmpp-bosh@0.5.6 ERR! node-expat@1.4.4 install: `node-waf configure build` ERR! `cmd "/c" "node-waf configure build"` failed with 1 ERR! ERR! Failed at the node-expat@1.4.4 install script. ERR! This is most likely a problem with the node-expat package, ERR! not with npm itself. ERR! Tell the author that this fails on your system: ERR! node-waf configure build ERR! You can get their info via: ERR! npm owner ls node-expat ERR! There is likely additional logging output above. ERR! ERR! System Windows_NT 5.1.2600 ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "node-xmpp-bosh" ERR! cwd C:\Program Files\nodejs ERR! node -v v0.6.11 ERR! npm -v 1.1.1 ERR! code ELIFECYCLE ERR! message node-expat@1.4.4 install: `node-waf configure build` ERR! message `cmd "/c" "node-waf configure build"` failed with 1 ERR! errno {} verbose exit [ 1, true ] 

我能做些什么来解决这个问题谢谢!

这可能有帮助: https : //github.com/astro/node-expat/pull/23

它看起来像node-expat模块,node-xmpp node-waf依赖于node-expat模块,它使用node-waf ,这在Windows上不可用。

这里有一些更多的信息: 什么是“节点waf”,以及如何在Windows上得到它?

基本上看起来就像你运气不好,除非你设法使用Visual Studio构buildnode-expat本地扩展。

编辑:有人编译了更多的信息在Windows上的node-waf替代品: https : node-waf