Open enriquemorenotent opened 6 years ago
Is node-irc not suited to run on the browser?
No, it requires node apis.
A late response, I'm looking into doing similar. In this case you'd need a NodeJS backend with a WebSocket.
Alternatively if you're using Electron you could either use preloads or give direct access to NodeJS within the BrowserWindow.
The net
library that this library uses is a NodeJS Module thus doesn't exist within a browser context.
Hope this answers anyones questions about this in future, this also will apply to Angular or any other web based frontend.
I am trying to build a IRC client using React, and I wanted to use this package. While running on the command line, a simple command like this seemed to work great.
But when I put the code inside my react app I meet this error in the console:
Why am I meeting this error on the browser with the same code? Is node-irc not suited to run on the browser? Do I need to create my own API to communicate with it?