slact / nchan.js

NPM package for the Javasript client for Nchan
Other
91 stars 25 forks source link

Error while using the NPM package #18

Closed afonsosantos closed 5 years ago

afonsosantos commented 5 years ago

Hi,

I'm getting this error when using the NPM package:

(node:12764) UnhandledPromiseRejectionWarning: TypeError: global.addEventListener is not a function
    at new NchanSubscriber (C:\Users\afons\Documents\Projetos\Bots\bot_radioafonsosantos_status\node_modules\nchan\NchanSubscriber.js:353:12)
    at Client.bot.on (C:\Users\afons\Documents\Projetos\Bots\bot_radioafonsosantos_status\index.js:10:13)
    at Client.emit (events.js:203:15)
    at WebSocketConnection.triggerReady (C:\Users\afons\Documents\Projetos\Bots\bot_radioafonsosantos_status\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:125:17)
    at WebSocketConnection.checkIfReady (C:\Users\afons\Documents\Projetos\Bots\bot_radioafonsosantos_status\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:141:61)
    at GuildCreateHandler.handle (C:\Users\afons\Documents\Projetos\Bots\bot_radioafonsosantos_status\node_modules\discord.js\src\client\websocket\packets\handlers\GuildCreate.js:13:31)
    at WebSocketPacketManager.handle (C:\Users\afons\Documents\Projetos\Bots\bot_radioafonsosantos_status\node_modules\discord.js\src\client\websocket\packets\WebSocketPacketManager.js:105:65)
    at WebSocketConnection.onPacket (C:\Users\afons\Documents\Projetos\Bots\bot_radioafonsosantos_status\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:333:35)
    at WebSocketConnection.onMessage (C:\Users\afons\Documents\Projetos\Bots\bot_radioafonsosantos_status\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:296:17)
    at WebSocket.onMessage (C:\Users\afons\Documents\Projetos\Bots\bot_radioafonsosantos_status\node_modules\ws\lib\event-target.js:120:16)
(node:12764) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:12764) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

May I get some support on this?

Thanks!

afonsosantos commented 5 years ago

Closing, as I found out that nChan only works with a interface, requiring some DOM elements.

sallespro commented 4 years ago

oi Afonso, tudo bem ? você está usando outro tipo de servidor pub/sub ? Qual sua opção após a descoberta ?