ethan0905 / ft_transcendence

Wiki with step-by-step explained strategy on how to: create app (front+back+infra), 42auth, 2FA and more..
2 stars 0 forks source link

Cannot find module '@nestjs/websockets' #10

Closed kenny-dng closed 1 year ago

kenny-dng commented 1 year ago

backend_nestjs | src/chat/chat.gateway.ts:8:8 - error TS2307: Cannot find module '@nestjs/websockets' or its corresponding type declarations. backend_nestjs | backend_nestjs | 8 } from '@nestjs/websockets'; backend_nestjs | ~~~~ backend_nestjs | src/chat/chat.gateway.ts:9:32 - error TS2307: Cannot find module 'socket.io' or its corresponding type declarations. backend_nestjs | backend_nestjs | 9 import { Server, Socket } from 'socket.io'; backend_nestjs | ~~~ backend_nestjs | src/chat/chat.service.ts:16:47 - error TS2339: Property 'chat' does not exist on type 'PrismaService'. backend_nestjs | backend_nestjs | 16 const channel = await this.prisma.chat.create({ backend_nestjs | ~~~~ backend_nestjs | backend_nestjs | Found 3 error(s). backend_nestjs | backend_nestjs exited with code 0

ethan0905 commented 1 year ago

the error is probably coming from the socket.io and @nestjs/websocket packages missings (on your specific github commit). try using this:

$ npm i --save socket.io @nestjs/websockets @nestjs/platform-socket.io