-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught TypeError: response.setEncoding is not a function #961
Comments
where to put this code ? any specific file ? |
In any file that gets loaded before you use the library. Some main/index file would work. If you have an entry point for the code related to socket-io it's better. Or you could put it in a separate file that you'd name specifically so other understand it's a dirty fix, and then import it in a main/index file. |
i have put this code in run(), it returns setEncoding = undefined, then i assign a function to it (according to your solution) ,it returns setEncoding = function, afterwords it returns setEncoding = undefined and gives error. i think the XMLHttpRequest.js load continuously that's why its re-change the type of setEncoding ? |
That's weird. What's the You probably want to do this outside a function, before your code is executed. I don't understand why the |
Closed due to inactivity, please reopen if needed. |
Hi,
I tried to install socket.io-client in a meteor app, it seems that browserify is responsible (see this issue), but I'm posting this here, because I believe other could have the same issue (and in case someone knows a better fix). Feel free to close the issue if you find it appropriate.
So my app crashes there, it's in the node-XMLHttpRequest (the repository doesn't accept issues), which is required by engine.io, which itself is required by socket.io-client.
So I decided to hack the browserify response object, like this:
And so far it works.
The text was updated successfully, but these errors were encountered: