var WebSocketsServer = require('fxos-websocket-server');
But I can't even get past the Browserify stage, because it cannot find a dependency:
Error: ENOENT, open '/Users/sole/data/p2pweb/websockets-example/node_modules/fxos-websocket-server/components/event-dispatcher-js/event-dispatcher.es6.js'
I tried modifying the value for the main entry in package.json so it would point to the standalone version of the dist/ file (fxos-websocket-server-standalone.js), but I get the same error.
Then I tried to regenerate the bundle after npm installing everything and I ended up with an empty standalone module and another error:
[13:25:07] Using gulpfile ~/data/p2pweb/fxos-websocket-server/gulpfile.js
[13:25:07] Starting 'compile'...
[13:25:07] Starting 'compile-standalone'...
Error: ENOENT, open '/Users/sole/data/p2pweb/fxos-websocket-server/components/event-dispatcher-js/event-dispatcher.es6.js'
[13:25:09] Finished 'compile' after 1.5 s
lol:fxos-websocket-server sole$ ls -l dist
total 120
-rw-r--r--+ 1 sole staff 0 31 May 13:25 fxos-websocket-server-standalone.js
-rw-r--r--+ 1 sole staff 60917 31 May 13:25 fxos-websocket-server.js
Let me know if you need any more info, although I'm not doing anything overly special here! I wonder how you even got to generate the standalone file and also run the example!
I'm trying to use this module as a naive user would use. So I installed it to my project:
Then I tried to require it:
But I can't even get past the Browserify stage, because it cannot find a dependency:
I tried modifying the value for the
main
entry inpackage.json
so it would point to the standalone version of thedist/
file (fxos-websocket-server-standalone.js
), but I get the same error.Then I tried to regenerate the bundle after npm installing everything and I ended up with an empty standalone module and another error:
Let me know if you need any more info, although I'm not doing anything overly special here! I wonder how you even got to generate the standalone file and also run the example!