我正在运行Ubuntu,我正在尝试使用hubot连接到我的本地openfire服务器。我按照教程here,一切都很顺利,直到最后,编辑了依赖项后,我运行npm install
并收到两个警告:
npm WARN package.json node-xmpp@0.3.2 'repositories' (plural) Not supported.
npm WARN package.json Please pick one as the 'repository' field
> node-stringprep@0.1.11 install /opt/hubot/my-bot/node_modules/node-stringprep
> node-gyp rebuild
我不确定存储库不受支持意味着什么,我尝试了npm install node-stringprep
和node-gyp rebuild
。 npm安装给了我相同的警告,但成功完成,而重建给我这个错误输出:
gyp info it worked if it ends with ok
gyp info using node-gyp@0.12.1
gyp info using node@0.10.23 | linux | x64
gyp info spawn python
gyp info spawn args [ '/usr/local/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/opt/hubot/my-bot/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/jake/.node-gyp/0.10.23/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/home/jake/.node-gyp/0.10.23',
gyp info spawn args '-Dmodule_root_dir=/opt/hubot/my-bot',
gyp info spawn args '--depth=.',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp: binding.gyp not found (cwd: /opt/hubot/my-bot)
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/node-gyp/lib/configure.js:337:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:789:12)
gyp ERR! System Linux 3.8.0-34-generic
gyp ERR! command "node" "/usr/local/bin/node-gyp" "rebuild"
gyp ERR! cwd /opt/hubot/my-bot
gyp ERR! node -v v0.10.23
gyp ERR! node-gyp -v v0.12.1
gyp ERR! not ok
由于它们是警告而不是错误(在npm安装上),我继续并启动hubot以查看它是否会连接,但事实并非如此。我没有收到任何错误但它没有连接。运行bot时的输出:
jake@jake-Lenovo-G580:/opt/hubot/my-bot$ ./bin/hubot --adapter xmpp
npm WARN package.json node-xmpp@0.3.2 'repositories' (plural) Not supported.
npm WARN package.json Please pick one as the 'repository' field
> node-stringprep@0.1.11 install /opt/hubot/my-bot/node_modules/node-stringprep
> node-gyp rebuild
make: Entering directory `/opt/hubot/my-bot/node_modules/node-stringprep/build'
CXX(target) Release/obj.target/node_stringprep/node-stringprep.o
SOLINK_MODULE(target) Release/obj.target/node_stringprep.node
SOLINK_MODULE(target) Release/obj.target/node_stringprep.node: Finished
COPY Release/node_stringprep.node
make: Leaving directory `/opt/hubot/my-bot/node_modules/node-stringprep/build'
[Mon Dec 30 2013 13:39:23 GMT-0700 (MST)] INFO { username: 'hubot',
password: 'asdf',
host: '127.0.0.1',
port: '9090',
rooms: [ { jid: 'hubot-test', password: false } ],
keepaliveInterval: 30000 }
没有任何反应。
我多次检查所有hubot xmpp字段以确保它们是正确的,虽然这个特定输出没有它,但我尝试了几种用户名变体 - > hubot@jake-lenovo-g580
和hubot@jake-Lenovo-G580
,以便与我的域名匹配。
任何帮助都非常感激。