Closed MarcP9 closed 1 year ago
what's the output of npx nest info
?
related with this comment btw: https://github.com/nestjs/nest/issues/11057#issuecomment-1419895125
Make sure your @nestjs/websockets
package version matches the version of @nestjs/core
Is there an existing issue for this?
Current behavior
In this new version when trying to work whit a Gateway, it crash saying
TypeError: this.metadataScanner.getAllMethodNames is not a function at GatewayMetadataExplorer.explore (/app/node_modules/@nestjs/websockets/gateway-metadata-explorer.js:13:14)
Imposible to make work the documentation examples, think that not happends when i use the library version 9.2.*
Minimum reproduction code
https://github.com/nestjs/nest
Steps to reproduce
No response
Expected behavior
thats, my chatGateway test:
import { SubscribeMessage, WebSocketGateway, WebSocketServer } from '@nestjs/websockets'; import { Socket, Server } from 'socket.io';
@WebSocketGateway({ cors: true }) export class ChatGateway {
@WebSocketServer() server: Server;
@SubscribeMessage('sendMessage') async handleSendMessage(client: Socket, payload: string): Promise {
return 'hello world!!!!';
}
}
Package
Other package
No response
NestJS version
No response
Packages versions
Node.js version
No response
In which operating systems have you tested?
Other
No response