你好,我是nodejs word的新手,我使用的是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 ]我能做些什么来解决这个问题,谢谢!
发布于 2012-06-11 14:50:55
发布于 2012-03-02 20:21:21
看起来node-xmpp-bosh所依赖的node-expat模块使用了node-waf,这在Windows上是不可用的。
这里有更多信息:What is "node-waf" and how to get it on Windows?
除非您设法使用Visual Studio构建node-expat本机扩展,否则基本上看起来您在这方面不太走运。
EDIT:有人在这里编译了更多关于node-waf的替代方案的信息:https://stackoverflow.com/a/9471319/288425
https://stackoverflow.com/questions/9526855
复制相似问题