You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Take a Create-React-App project with TypeScript, and update to the latest version of Socket.io-client.
Expected behavior
Upgrading shouldn't throw exceptions.
Platform:
Device: Apple Mini M1
OS: Mac OS
Additional context
Again, I have isolated the problem to this specific update: it works perfectly fine with v4.2.0, and breaks when only socket.io-client is updated to v4.3.1.
The previous commit, while successfully restoring support for:
```js
const socket = require("socket.io-client")(...);
```
breaks for some other cases:
- socketio/socket.io#4128
- #1509
According to [1], we should use `export = `, but this is not supported
by module "esnext":
> Export assignment cannot be used when targeting ECMAScript modules
So we'll go for this ugly workaround, at least until we remove the
default export in the next major release.
[1]: https://www.typescriptlang.org/docs/handbook/modules.html#export--and-import--require
The previous commit, while successfully restoring support for:
```js
const socket = require("socket.io-client")(...);
```
breaks for some other cases:
- socketio/socket.io#4128
- socketio/socket.io-client#1509
According to [1], we should use `export = `, but this is not supported
by module "esnext":
> Export assignment cannot be used when targeting ECMAScript modules
So we'll go for this ugly workaround, at least until we remove the
default export in the next major release.
[1]: https://www.typescriptlang.org/docs/handbook/modules.html#export--and-import--require
Describe the bug
Without changing anything else, migrating from
v4.2.0
tov4.3.1
introduces a bug when running Socket IO.The tech stack is Create-React-App (latest) + TypeScript (latest).
Full stack trace:
To Reproduce
Take a Create-React-App project with TypeScript, and update to the latest version of Socket.io-client.
Expected behavior
Upgrading shouldn't throw exceptions.
Platform:
Additional context
Again, I have isolated the problem to this specific update: it works perfectly fine with v4.2.0, and breaks when only socket.io-client is updated to v4.3.1.
The frontend I've discovered that problem on is https://github.com/antoinejaussoin/retro-board/blob/develop/frontend/package.json#L66.
The text was updated successfully, but these errors were encountered: