-
Notifications
You must be signed in to change notification settings - Fork 356
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
Importing non-existant xmlhttprequest-ssl #543
Comments
This issue still exists in the current release. So I don't know why it has been closed... |
@ramsestom could you please provide more details? |
I do not use engine.io-client in a browser (I use it in react-native) so this is probably not considered. Anyway, for me the correct file is in \node_modules\xmlhttprequest-ssl\lib\XMLHttpRequest.js and not directly in lib\XMLHttpRequest.js ... |
@ramsestom I think you are misunderstanding:
So a node.js client would use the
The browser field (spec) describes which files are to be used in the browser (client-side). Here, instead of using the So I still think the issue is in react-native (and that may be related: facebook/react-native#9854) |
OK. I removed the The browser field from the package.json package and the react-narive packager is now able to correctly find the ssl-xmlhttprequest package and class. This now fail because XMLLHttpRequest.js from ssl-xmlhttprequest is using core node modules (like fs) that react-native doesn't have. So, for now, I will stick to using the xmlhttprequest class embeded into the engine.io source (and completely remove the ssl-xmlhttprequest dependency) |
You want to:
Current behaviour
Fails importing xmlhttprequest-ssl.js as it doesn't exist.
Steps to reproduce (if the current behaviour is a bug)
It's on the master branch.
Expected behaviour
The file should exist.
Setup
Other information (e.g. stacktraces, related issues, suggestions how to fix)
https://github.com/socketio/engine.io-client/blob/master/lib/transports/index.js#L5
https://github.com/socketio/engine.io-client/blob/master/lib/transports/polling-xhr.js#L5
https://github.com/socketio/engine.io-client/blob/master/lib/transports/polling.js#L23
All 3 files require
xmlhttprequest-ssl.js
which doesn't exist. Changing them to../xmlhttprequest
works. I guess the ssl file is under development. This is a temporary fix.The text was updated successfully, but these errors were encountered: