Hi,
I'm trying to run Botkit for Jabber env but I have issue with the framework.
I alreay validated my IM&P env as it works with simple-xmpp framework.
# node test.js
/root/botkit-test/botkit/lib/JabberBot.js:44
let roster_stanza = new Stanza('iq', { 'from': config.client, 'typ
^^^^^^^^^^^^^
SyntaxError: Unexpected identifier
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/root/botkit-test/botkit/test.js:1:82)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
Thanks in advance for your support !
Hi 馃憢 can you post a little more of the code snippet that is throwing the error? Could b a simple syntax issue, but not sure from thr error message alone.
@qiongfangzhang any ideas?
thanks a lot for your reactivity and sorry for me...
the code is very simple and come from the example:
const Botkit = require('./lib/JabberBot.js');
var controller = Botkit({
json_file_store: './bot_store/'
});
var bot = controller.spawn({
client: {
jid: '[email protected]',
password: 'xxx',
host: "xxxx",
port: 5222
}
});
controller.hears(['hello'], ['direct_mention', 'direct_message'], function (bot, message) {
bot.reply(message, 'Hi');
});
controller.on('direct_mention', function (bot, message) {
bot.reply(message, 'You mentioned me in a group and said, "' + message.text + '"');
});
controller.on('direct_message', function (bot, message) {
bot.reply(message, 'I got your direct message. You said, "' + message.text + '"');
});
node version: v0.10.48
I have submit a fix for this at
https://github.com/qiongfangzhang/botkit
Please try if it fix this issue.
Or you can upgrade your node to a higher version.
hi
Thanks a lot for your reactivity (once again ^^) !!!
I tested the fix but without success..
I can't update node as it comes from an enterprise redhat master.
# node test.js
/root/botkit/lib/JabberBot.js:45
let roster_stanza = new Stanza('iq', { 'from': config.client.jid.t
^^^^^^^^^^^^^
SyntaxError: Unexpected identifier
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/root/botkit/test.js:1:82)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
if you have some ideas to fix it, thanks in advance !
Guillain
that is a pretty old version of node. You might want to talk to your admins about getting that upgrade and let us know if you still see problems.
Yep I know... but sometime we don't have the choice... so as workaround docker should help me (waiting approval).
So thanks a lot for your support and your help!