angularnpmwebpacknext.js

Module not found: Error: Can't resolve 'net' in 'node_modules/stompjs/lib'


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'

Solution

  • 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.