I'm using node-xmpp using browserify for web application. When I try to make a for browser file using browserify, the resulting file outputs this in js console -
Cannot load StringPrep-0.1.0 bindings. You may need to
npm install node-stringprep
client.js:5108 Cannot load StringPrep-0.2.3 bindings (using fallback). You may need tonpm install node-stringprep
client.js:34 Cannot load StringPrep-0.2.3 bindings (using fallback). You may need tonpm install node-stringprep
After which the code fails saying
Uncaught TypeError: undefined is not a function
The file client.js work fine when i use in terminal
node client.js
There is nothing much in client.js
var xmpp = require('simple-xmpp');
xmpp.connect({
jid : 'loginid',
password : 'password',
host : 'localhost',
port : 5222
});
xmpp.on('online', function() {
console.log('Yes, I\'m connected!');
});
xmpp.on('chat', function(from, message) {
xmpp.send(from, 'echo: ' + message);
});
xmpp.on('error', function(err) {
console.error(err);
});
xmpp.on('subscribe', function(from) {
if (from === '[email protected]') {
xmpp.acceptSubscription(from);
}
});
which I simply took from their documentation. Any pointers ??
If its Fedora try
yum install libicu-devel
libicu "provides Unicode and Globalization support for software applications" and I guess the up-to-date version of this is needed by node-xmpp.
On a Debian 6 system
apt-get install libicu-dev
might work.
https://github.com/node-xmpp/node-stringprep
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With