Skip to content
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

fix: correctly consume ws package #5220

Merged
merged 1 commit into from
Jan 7, 2025
Merged

Conversation

benmccann
Copy link
Contributor

The kind of change this PR does introduce

  • a bug fix
  • a new feature
  • an update to the documentation
  • a code change that improves performance
  • other

Current behavior

SyntaxError: Named export 'WebSocket' not found. The requested module 'ws' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from 'ws';
const { WebSocket } = pkg;

New behavior

Works

Other information (e.g. related issues)

Hitting this in https://github.com/immich-app/immich

I also saw a couple projects hitting this error when searching online, but didn't look closely at them to see if they're using socket.io/engine.io:

Sorry, something went wrong.

@benmccann
Copy link
Contributor Author

@darrachequesne any chance you could take a look at this?

@darrachequesne darrachequesne merged commit 7fcddcb into socketio:main Jan 7, 2025
@darrachequesne
Copy link
Member

@benmccann thanks 👍

@benmccann benmccann deleted the patch-1 branch January 22, 2025 20:02
@benmccann
Copy link
Contributor Author

Thanks! Any chance we could get a new release?

@darrachequesne
Copy link
Member

@benmccann here we go: engine.io-client@6.6.3

@darrachequesne darrachequesne added this to the engine.io-client@6.6.3 milestone Jan 23, 2025
@benmccann
Copy link
Contributor Author

Thank you!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants