Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: xmpp.Iq is not a constructor #29

Open
JimLynchCodes opened this issue Mar 25, 2020 · 2 comments
Open

TypeError: xmpp.Iq is not a constructor #29

JimLynchCodes opened this issue Mar 25, 2020 · 2 comments

Comments

@JimLynchCodes
Copy link

Hello! I am trying to run the example file with node v10.19.0.

Here is my code:

var Superfeedr = require('superfeedr');

client = new Superfeedr("Eonjim", "[my_actual_password]");
client.on('connected', function () {

    console.log('connected!');
    client.subscribe("http://blog.superfeedr.com/atom.xml", function (err, feed) {
        
          console.log('subscribed!', feed);
    });
});

It seems to be successfully connected, but when trying to subscribe to any feed I just get the same error...

Here is the error output I'm seeing:

(node:78407) [DEP0107] DeprecationWarning: tls.convertNPNProtocols() is deprecated.
connected!
/Users/jlynch/Git-Projects/Ameritrader-Bots/news-watcher/node_modules/superfeedr/lib/superfeedr.js:190
  var subscribeStanza = new xmpp.Iq({to: SUPERFEEDR_ENDPOINT, id:id, type:'set', from: this.client.jid})
                        ^

TypeError: xmpp.Iq is not a constructor
    at Superfeedr.subscribe (/Users/jlynch/Git-Projects/Ameritrader-Bots/news-watcher/node_modules/superfeedr/lib/superfeedr.js:190:25)
    at Superfeedr.<anonymous> (/Users/jlynch/Git-Projects/Ameritrader-Bots/news-watcher/watcher.js:8:12)
    at Superfeedr.emit (events.js:198:13)
    at Client.<anonymous> (/Users/jlynch/Git-Projects/Ameritrader-Bots/news-watcher/node_modules/superfeedr/lib/superfeedr.js:19:10)
    at Client.emit (events.js:198:13)
    at Client.useFeatures (/Users/jlynch/Git-Projects/Ameritrader-Bots/news-watcher/node_modules/node-xmpp-client/lib/Client.js:365:10)
    at Client._handleSessionState (/Users/jlynch/Git-Projects/Ameritrader-Bots/news-watcher/node_modules/node-xmpp-client/lib/Client.js:261:10)
    at Client._handleStanza (/Users/jlynch/Git-Projects/Ameritrader-Bots/news-watcher/node_modules/node-xmpp-client/lib/Client.js:242:14)
    at Client.onStanza (/Users/jlynch/Git-Projects/Ameritrader-Bots/news-watcher/node_modules/node-xmpp-client/lib/Client.js:221:8)
    at Connection.emit (events.js:198:13)

Any thoughts on what I'm doing wrong here?

Thanks! ♥️

@JimLynchCodes
Copy link
Author

Same error when I try running with node v11.15.0

@JimLynchCodes
Copy link
Author

bump 🙃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant