[ ] Regression
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.
/@nestjs/websockets/adapters/io-adapter.d.ts
is not importing socket.io correctly. It is a bus with new version of @types/socket.io package
Nest version: 4.6.6
Socket.io: 2.0.4
@types/socket.io: 1.4.32
I too am getting a compilation error,
node_modules/@nestjs/websockets/adapters/io-adapter.d.ts(14,27): error TS2503: Cannot find namespace 'SocketIO'.
node_modules/@nestjs/websockets/adapters/io-adapter.d.ts(16,35): error TS2503: Cannot find namespace 'SocketIO'.
if i swap out /// <reference types="socket.io" />
for import * as SocketIO from 'socket.io'
it compiles, but changing node_modules is a very ephemeral fix, so hopefully i'm just missing something else
I think it is not a NestJS error. See here: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/24330
yarn add @types/[email protected]
fixed the problem because 1.4.32 typings are broken.
1.4.33 (latest) also works
@nestjs/websocket: 5.0.1
@types/socket.io: 1.4.36
don't fix
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
yarn add @types/[email protected]
fixed the problem because 1.4.32 typings are broken.