xmppjs / xmpp.js

XMPP for JavaScript
ISC License
2.2k stars 374 forks source link

ReferenceError: debug is not defined #814

Closed timepp closed 4 years ago

timepp commented 4 years ago

using exactly the example in the npm page resule the following error

D:\xmpptest>node ./main.js
D:\xmpptest\main.js:11
debug(xmpp, true)
^

ReferenceError: debug is not defined
    at Object.<anonymous> (D:\xmpptest\main.js:11:1)
    at Module._compile (internal/modules/cjs/loader.js:1144:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1164:10)
    at Module.load (internal/modules/cjs/loader.js:993:32)
    at Function.Module._load (internal/modules/cjs/loader.js:892:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47

D:\xmpptest>node -v
v13.6.0
sonnyp commented 4 years ago

I will fix the README, meanwhile:

install @xmpp/debug

and

const debug = require('@xmpp/debug')

timepp commented 4 years ago

Thanks!

sonnyp commented 4 years ago

https://github.com/xmppjs/xmpp.js/pull/816