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 realise this is a really old issue, but if anyone else comes here looking for it like I did, this is likely because you're using stompjs from NPM in a browser based client app and the default import from the stompjs npm package is the node client that has a TCP fallback built in, which is not available in browsers.
Long story short, you can (possibly) work around it one of 3? ways.
import the browser-only version of the file from lib like so;
import { Stomp } from "stompjs/lib/stomp.js";
include the 'net' npm package
npm i net -S
get webpack to mock the package for you
node: {
net: 'empty',
},
ERROR in ./node_modules/stompjs/lib/stomp-node.js 11:8-22
this error comes from node modules inside stomp. how to fix this if anyone knows, please leave comment below.
as soon as it's urgent for me.
Thank you!
The text was updated successfully, but these errors were encountered: