You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
new irc.Client( 'chat.freenode.net', 'Helloworld', { channels: ["#test"] })
But when I put the code inside my react app I meet this error in the console:
irc.js:796 Uncaught TypeError: net.createConnection is not a function
at Client../node_modules/irc/lib/irc.js.Client.connect (irc.js:796)
at new Client (irc.js:107)
at reducer (reducer.js:50)
at dispatch (redux.js:213)
at redux-logger.js:1
at Object.dispatch (index.js:11)
at ChannelView.connectToServer (ChannelView.js:9)
at onClick (ChannelView.js:24)
at HTMLUnknownElement.callCallback (react-dom.development.js:100)
at Object.invokeGuardedCallbackDev (react-dom.development.js:138)
at Object.invokeGuardedCallback (react-dom.development.js:187)
at Object.invokeGuardedCallbackAndCatchFirstError (react-dom.development.js:201)
at executeDispatch (react-dom.development.js:461)
at executeDispatchesInOrder (react-dom.development.js:483)
at executeDispatchesAndRelease (react-dom.development.js:581)
at executeDispatchesAndReleaseTopLevel (react-dom.development.js:592)
at forEachAccumulated (react-dom.development.js:562)
at runEventsInBatch (react-dom.development.js:723)
at runExtractedEventsInBatch (react-dom.development.js:732)
at handleTopLevel (react-dom.development.js:4472)
at batchedUpdates$1 (react-dom.development.js:16537)
at batchedUpdates (react-dom.development.js:2131)
at dispatchEvent (react-dom.development.js:4551)
at interactiveUpdates$1 (react-dom.development.js:16592)
at interactiveUpdates (react-dom.development.js:2150)
at dispatchInteractiveEvent (react-dom.development.js:4528)
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?
The text was updated successfully, but these errors were encountered:
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?
The text was updated successfully, but these errors were encountered: