azasypkin / js-websocket-server

WebSocket server written in JS (initially for Firefox OS)
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

Error when require-ing module: event-dispatcher.es6.js is missing #1

Open sole opened 9 years ago

sole commented 9 years ago

I'm trying to use this module as a naive user would use. So I installed it to my project:

npm install --save git+https://github.com/p2p-web/fxos-websocket-server.git

Then I tried to require it:

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!

azasypkin commented 9 years ago

Ah, sorry, just noticed this issue :( Will take a look tomorrow!