-
-
Notifications
You must be signed in to change notification settings - Fork 255
socket.io #525
Comments
I'm trying to use jspm beta.9 to install socket.io (on node). I've run into a couple of issues relating to the point above:
Gives me the following error:
This appears to be due to the url encoding of "/" in the version string in "package-name.js", while the package version information returned from
This is caused by the
I'm assuming this is fixable with a package override for has-cors? Will try to do that. |
Both of the above sound like simple jspm bugs to fix actually, I will see if I can take a look at this later on this week. |
Great, thanks! |
I've just tested this and |
Yes, socket.io now installs correctly. Both issues were solved by overrides - so I'd suggest that the original problems haven't been solved. The first issue was originally caused by the override for the old version of engine.io-client. The new version uses "xmlhttprequest-ssl" from npm. The second issue is solved by my commits to the registry which ensure a new enough version of ws which uses an upgraded version of has-cors. fyi - jspm install github:rase-/node-XMLHttpRequest@add/ssl-support -o "{registry:'npm'}", still fails for me on 0.17.0-beta9. Will now test with the latest version of 0.17. Also, though socket.io installs it will not run, without using my fork at: https://github.com/salfield/socket.io I don't see this being resolved without a solution to: & |
I just looked into these again and the second issue is specifically on has-cors 1.0.3 and not 1.1.0. I managed to track that down to a fix in jspm/npm@9d40917. I must have been running on jspm 0.16 by mistake actually as the first issue is definitely still there, but let's continue to track this at jspm/jspm-cli#1571. In terms of the remaining issues to get socket.io running:
|
Wow, thanks so much for this :-) I'll try and move back to socketio/socket.io as soon as you release the new build. Seems like you have solutions for both my problems with respect to running socket.io. I'll submit to the registry as soon as I know socket.io is running correctly with the above override. Incidentally, this problem is caused by a combination of: |
For some reason in jspm beta.11 this doesn't seem to work for me. I've tried both:
and
My package.json file has the following entry:
However, I still get the error caused by the import socket.io-client! Quite strange and I feel like I must be missing something obvious. |
@salfield yes there is a bug with these maps in jspm 0.17 tracked in jspm/npm#129. |
Great, thanks for letting me know. |
From what I can tell |
The above issue didn't stop socket.io from installing, only from running. I'm pretty sure the above overrides are required to run socket.io under jspm. Are the node specific overrides fixed in the latest beta? If so, it should install and run with the above overrides, which I'm happy to submit to the jspm registry after testing. |
Socket.io has the following issues:
jspm install github:rase-/node-XMLHttpRequest@add/ssl-support -o "{registry:'npm'}"
as it needs a GitHub dependency for npm (this is explained in the warning on install)socket.io-client/package
where the intention is to load the package.json. This can be fixed with a map on install -jspm install npm:socket.io -o "{map:{'socket.io-client/package':'socket.io-client/package.json!'}}"
followed by ajspm install json
.This then gets us to the current error:
Which is a blocker as we don't currently support
require.resolve
for npm. We could support this though by replacing it with aSystem.normalizeSync(..., module.id)
, which is tracking in jspm/npm#88.If we manually replace line 14 in
jspm_packages/npm/[email protected]/lib.index.js
from:to
Then that seems to make socket.io work currently.
The text was updated successfully, but these errors were encountered: