Closed mkolodny closed 9 years ago
I'm now seeing the error TypeError: this._SocketConstructor is not a function
when requiring asteroid
in my karma tests after the update. I also see this error if I use dist/asteroid.browser.js
instead of dist/asteroid.node.js
.
Any advice for using asteroid with karma/browserify?
I ended up getting this to work by installing [SockJS], and using dist/asteroid.browser.js
.
Hi, just for future reference.. The fs module will not work on the client. You should move file access to a place that is server only. That worked for me.
I'm seeing the error
"Uncaught Error: process.binding is not supported"
when attempting torequire 'asteroid'
using browserify.It appears that the problem is in
faye-websocket
. Browserify uses the process package to mimic to Node's built-inprocess
module. Theprocess
module doesn't shim thebinding
method, which is causing the error I'm seeing. This issue goes away when I replacefaye-websocket
with the websocket package.I'm going to submit a pull request that uses the more popular websocket package instead of faye-websocket.