Got an issue where a stompJS-lib was not found, upon which I got the following error message:
Module not found: Error: Can't resolve 'net' in '/../../../.../../../angular-app/node_modules/stompjs/lib'
The following command (which installs the missing dependencies):
npm i net -S
This does not install random packages as assumed below. If you want the frontend to have some level of non-authoritative processing to be done on the client-side of those required dependencies, then this is the option to consider.
To avoid installing random packages, you could add this into your Webpack configuration.
node: {
net: 'empty',
},
The issue is caused by expecting the net package which is a package from Node.JS and does not exist in the browser.
If you want more information and explanations you can find it here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With