0

I am trying to implement a requirement on node-xmpp-server, but i am facing issue while installing this module. I have read the blog on how to install and read few other blog posts too, but nothing is helping me out.

When I am trying to use npm install with the dependency mentioned in package.json or if I explicitly install the module, i am getting following error:

> node-stringprep@0.5.2 install /home/gaurav/NodeOffcRepo/chatPro/node_modules/node-xmpp-server/node_modules/node-xmpp-core/node_modules/node-stringprep
> node-gyp rebuild

gyp ERR! configure error 
gyp ERR! stack Error: "pre" versions of node cannot be installed, use the --nodedir flag instead
gyp ERR! stack     at install (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:66:16)
gyp ERR! stack     at Object.self.commands.(anonymous function) [as install] (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js:66:37)
gyp ERR! stack     at getNodeDir (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:152:20)
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:95:9
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:722:7)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at maybeClose (child_process.js:999:16)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1071:5)
gyp ERR! System Linux 3.8.0-19-generic
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/gaurav/NodeOffcRepo/chatPro/node_modules/node-xmpp-server/node_modules/node-xmpp-core/node_modules/node-stringprep
gyp ERR! node -v v0.13.0-pre
gyp ERR! node-gyp -v v0.13.1
gyp ERR! not ok 
npm ERR! node-stringprep@0.5.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the node-stringprep@0.5.2 install script.
npm ERR! This is most likely a problem with the node-stringprep package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls node-stringprep
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.8.0-19-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "node-xmpp-server"
npm ERR! cwd /home/gaurav/NodeOffcRepo/chatPro
npm ERR! node -v v0.13.0-pre
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
|
> node-expat@2.3.1 install /home/gaurav/NodeOffcRepo/chatPro/node_modules/node-xmpp-server/node_modules/node-xmpp-core/node_modules/ltx/node_modules/node-expat
> node-gyp rebuild

gyp ERR! configure error 
gyp ERR! stack Error: "pre" versions of node cannot be installed, use the --nodedir flag instead
gyp ERR! stack     at install (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:66:16)
gyp ERR! stack     at Object.self.commands.(anonymous function) [as install] (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js:66:37)
gyp ERR! stack     at getNodeDir (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:152:20)
gyp ERR! stack     at /usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:95:9
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:722:7)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at maybeClose (child_process.js:999:16)
gyp ERR! stack     at Socket.<anonymous> (child_process.js:1167:11)
gyp ERR! stack     at Socket.emit (events.js:107:17)
gyp ERR! stack     at Pipe.close (net.js:461:12)
gyp ERR! System Linux 3.8.0-19-generic
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/gaurav/NodeOffcRepo/chatPro/node_modules/node-xmpp-server/node_modules/node-xmpp-core/node_modules/ltx/node_modules/node-expat
gyp ERR! node -v v0.13.0-pre
gyp ERR! node-gyp -v v0.13.1
gyp ERR! not ok 
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/gaurav/NodeOffcRepo/chatPro/npm-debug.log
npm ERR! not ok code 0

My node version is: v0.13.0-pre

If some more info is needed, please comment.

4

1 回答 1

0

检查是否安装了 node-xmpp 模块的依赖项。

尝试查看节点 xmpp 文档

您需要安装依赖于 libexpat 库的第一个 node-expat。我试过了

百胜安装 libexpat

但它不存在。我能够找到另一个有帮助的图书馆。

尝试:

(对于 CentOS)

百胜安装 libicu-devel

(对于 Debian 6 系统)

apt-get 安装 libicu-dev

然后

npm install node-expat

然后你可以安装 node-xmpp 模块。

于 2014-09-16T06:17:10.450 回答