Skip to content
This repository has been archived by the owner on Nov 28, 2018. It is now read-only.

Missing npm dependencies #41

Open
gottfrois opened this issue May 27, 2015 · 6 comments
Open

Missing npm dependencies #41

gottfrois opened this issue May 27, 2015 · 6 comments

Comments

@gottfrois
Copy link

When install the package using npm and loading it with webpack here is what I have:

Module not found: Error: Cannot resolve module 'net' in /Users/gottfrois/Code/TextMaster.com/node_modules/stomp/lib
 @ ./~/stomp/lib/stomp.js 24:10-24

Module not found: Error: Cannot resolve module 'tls' in /Users/gottfrois/Code/TextMaster.com/node_modules/stomp/lib
 @ ./~/stomp/lib/stomp.js 25:10-24
@Volodymyr128
Copy link

The same issue! Got:

ERROR in ./~/stompjs/lib/stomp-node.js
Module not found: Error: Cannot resolve module 'net' in D:\Projects\MyProject\node_modules\stompjs\lib

when running karma tests. Without Karma all works correct.
Looks like stomp-js team ignoring the problem

@Volodymyr128
Copy link

@gottfrois
I solved this by adding

        node: {
            net: 'empty'
        }

to my webpackConfig.js

@vianvio
Copy link

vianvio commented May 29, 2016

Not sure if it's too late for this... I added a main property to the package.json of stompjs in node_module.

"main": "./lib/stomp.min.js"

this solve the issue of my situation. Hope it will help

@elixiao
Copy link

elixiao commented Jan 19, 2017

I edit file your_path/node_modules/stompjs/index.js, comment it like this:

var Stomp = require('./lib/stomp.js');
// var StompNode = require('./lib/stomp-node.js');

module.exports = Stomp.Stomp;
// module.exports.overTCP = StompNode.overTCP;
// module.exports.overWS = StompNode.overWS;

@sinedsem
Copy link

sinedsem commented Feb 8, 2017

This repository is no longer supported by authors, isn't it? This is the only reason this issue still not fixed.
Does anyone know a good fork? Or another module for stomp js?

@BrandonDudek
Copy link

I added an npm dependency of "net": "1.0.2" to solve the " Cannot resolve module 'net' " error.

(Using Angular 6 and Typescript)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants