-
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
[socket.io-client 2] Unable to run on webpack >= 5 #1565
Comments
Hi @giovanni-bertoncelli , could you please provide a project reproducing the issue? That would help a lot, thanks. |
@darrachequesne https://codesandbox.io/s/serene-thunder-edirx3?file=/tsconfig.json here you can find a similar behaviour |
@giovanni-bertoncelli thanks, I could indeed reproduce. I'm investigating. |
It may be similar to this issue @darrachequesne: #1088 |
I'm not able to reproduce with a project created with Could it be linked to the CodeSandbox platform? |
Don't think so... the issue compared initially in a local project.. maybe try with a ng14 project locally on your machine |
Describe the bug
Since I have upgraded an Angular 13 app to Angular 14, that underneath uses webpack@5.74.0, the socket.io-client has a lot of issues and became unusable. All the nodejs polyfills for the
ws
dependency are gone so I got these kind of errors:I had to redirect all these dependencies to make it work:
That's very frustrating since these dependencies where not required before the ng upgrade and I have no actual use for these in my main package.json.
After resolving this issue I've encontered another issue, at runtime:
That, I presume, comes from the tls dependency:
In order to avoid all this I've installed
isomorphic-ws
and replaced thews
dependency with this package. Then it has no nodejs dependencies and compiles correctly.To Reproduce
Socket.IO server version:
2.4.1
Socket.IO client version:
2.5.0
Expected behavior
Should compile correctly.
Platform:
The text was updated successfully, but these errors were encountered: