소개
게시글
질문&답변
2022.11.13
소켓 이벤트 연결하기를 시청하다가 504 (Gateway Timeout) 오류가 떴습니다.
Executing (default): SELECT id, email, nickname, password, createdAt, updatedAt, deletedAt FROM users AS User WHERE (`User`.`deletedAt` IS NULL AND User.`email` = 'lee123@naver.com');Executing (default): SELECT id, nickname, email FROM users AS User WHERE (`User`.`deletedAt` IS NULL AND User.`id` = 8);POST /api/users/login 200 255.278 ms - 55Executing (default): SELECT User.`id`, User.`nickname`, User.`email`, Workspaces.`id` AS Workspaces.id, Workspaces.`name` AS Workspaces.name, Workspaces.`url` AS Workspaces.url, Workspaces.`createdAt` AS Workspaces.createdAt, Workspaces.`updatedAt` AS Workspaces.updatedAt, Workspaces.`deletedAt` AS Workspaces.deletedAt, Workspaces.`OwnerId` AS Workspaces.OwnerId, Workspaces->WorkspaceMember.`loggedInAt` AS Workspaces.WorkspaceMember.loggedInAt, Workspaces->WorkspaceMember.`createdAt` AS Workspaces.WorkspaceMember.createdAt, Workspaces->WorkspaceMember.`updatedAt` AS Workspaces.WorkspaceMember.updatedAt, Workspaces->WorkspaceMember.`WorkspaceId` AS Workspaces.WorkspaceMember.WorkspaceId, Workspaces->WorkspaceMember.`UserId` AS Workspaces.WorkspaceMember.UserId FROM users AS User LEFT OUTER JOIN ( workspacemembers AS Workspaces->WorkspaceMember INNER JOIN workspaces AS Workspaces ON Workspaces.`id` = Workspaces->WorkspaceMember.`WorkspaceId`) ON User.`id` = Workspaces->WorkspaceMember.`UserId` AND (`Workspaces`.`deletedAt` IS NULL) WHERE (`User`.`deletedAt` IS NULL AND User.`id` = 8);Executing (default): SELECT User.`id`, User.`nickname`, User.`email`, Workspaces.`id` AS Workspaces.id, Workspaces.`name` AS Workspaces.name, Workspaces.`url` AS Workspaces.url, Workspaces.`createdAt` AS Workspaces.createdAt, Workspaces.`updatedAt` AS Workspaces.updatedAt, Workspaces.`deletedAt` AS Workspaces.deletedAt, Workspaces.`OwnerId` AS Workspaces.OwnerId, Workspaces->WorkspaceMember.`loggedInAt` AS Workspaces.WorkspaceMember.loggedInAt, Workspaces->WorkspaceMember.`createdAt` AS Workspaces.WorkspaceMember.createdAt, Workspaces->WorkspaceMember.`updatedAt` AS Workspaces.WorkspaceMember.updatedAt, Workspaces->WorkspaceMember.`WorkspaceId` AS Workspaces.WorkspaceMember.WorkspaceId, Workspaces->WorkspaceMember.`UserId` AS Workspaces.WorkspaceMember.UserId FROM users AS User LEFT OUTER JOIN ( workspacemembers AS Workspaces->WorkspaceMember INNER JOIN workspaces AS Workspaces ON Workspaces.`id` = Workspaces->WorkspaceMember.`WorkspaceId`) ON User.`id` = Workspaces->WorkspaceMember.`UserId` AND (`Workspaces`.`deletedAt` IS NULL) WHERE (`User`.`deletedAt` IS NULL AND User.`id` = 8);Executing (default): SELECT id, name, url, createdAt, updatedAt, deletedAt, OwnerId FROM workspaces AS Workspace WHERE (`Workspace`.`deletedAt` IS NULL AND Workspace.`url` = 'sleact');Executing (default): SELECT id, name, url, createdAt, updatedAt, deletedAt, OwnerId FROM workspaces AS Workspace WHERE (`Workspace`.`deletedAt` IS NULL AND Workspace.`url` = 'sleact'); Executing (default): SELECT Channel.`id`, Channel.`name`, Channel.`private`, Channel.`createdAt`, Channel.`updatedAt`, Channel.`WorkspaceId`, Members.`id` AS Members.id, Members->ChannelMembers.`ChannelId` AS Members.ChannelMembers.ChannelId, Members->ChannelMembers.`UserId` AS Members.ChannelMembers.UserId FROM channels AS Channel INNER JOIN ( ChannelMembers AS Members->ChannelMembers INNER JOIN users AS Members ON Members.`id` = Members->ChannelMembers.`UserId` AND Members->ChannelMembers.`UserId` = 8) ON Channel.`id` = Members->ChannelMembers.`ChannelId` AND (`Members`.`deletedAt` IS NULL) WHERE Channel.`WorkspaceId` = 1;Executing (default): SELECT User.`id`, User.`nickname`, User.`email`, WorkspaceMember.`loggedInAt` AS WorkspaceMember.loggedInAt, WorkspaceMember.`createdAt` AS WorkspaceMember.createdAt, WorkspaceMember.`updatedAt` AS WorkspaceMember.updatedAt, WorkspaceMember.`WorkspaceId` AS WorkspaceMember.WorkspaceId, WorkspaceMember.`UserId` AS WorkspaceMember.UserId FROM users AS User INNER JOIN workspacemembers AS WorkspaceMember ON User.`id` = WorkspaceMember.`UserId` AND WorkspaceMember.`WorkspaceId` = 1 WHERE (`User`.`deletedAt` IS NULL);GET /api/workspaces/sleact/channels 200 46.302 ms - 2114GET /api/workspaces/sleact/members 200 49.981 ms - 666Executing (default): SELECT User.`id`, User.`nickname`, User.`email`, Workspaces.`id` AS Workspaces.id, Workspaces.`name` AS Workspaces.name, Workspaces.`url` AS Workspaces.url, Workspaces.`createdAt` AS Workspaces.createdAt, Workspaces.`updatedAt` AS Workspaces.updatedAt, Workspaces.`deletedAt` AS Workspaces.deletedAt, Workspaces.`OwnerId` AS Workspaces.OwnerId, Workspaces->WorkspaceMember.`loggedInAt` AS Workspaces.WorkspaceMember.loggedInAt, Workspaces->WorkspaceMember.`createdAt` AS Workspaces.WorkspaceMember.createdAt, Workspaces->WorkspaceMember.`updatedAt` AS Workspaces.WorkspaceMember.updatedAt, Workspaces->WorkspaceMember.`WorkspaceId` AS Workspaces.WorkspaceMember.WorkspaceId, Workspaces->WorkspaceMember.`UserId` AS Workspaces.WorkspaceMember.UserId FROM users AS User LEFT OUTER JOIN ( workspacemembers AS Workspaces->WorkspaceMember INNER JOIN workspaces AS Workspaces ON Workspaces.`id` = Workspaces->WorkspaceMember.`WorkspaceId`) ON User.`id` = Workspaces->WorkspaceMember.`UserId` AND (`Workspaces`.`deletedAt` IS NULL) WHERE (`User`.`deletedAt` IS NULL AND User.`id` = 8);GET /api/users 200 21.758 ms - 1317C:\Users\kimsh\Desktop\github-scm\sleact\back\socket.js:23 channels.forEach((channel) => { ^TypeError: Cannot read properties of undefined (reading 'forEach') at Socket. (C:\Users\kimsh\Desktop\github-scm\sleact\back\socket.js:23:16) at Socket.emit (node:events:513:28) at C:\Users\kimsh\Desktop\github-scm\sleact\back\node_modules\socket.io\lib\socket.js:531:14 at process.processTicksAndRejections (node:internal/process/task_queues:77:11)Node.js v18.12.0[nodemon] app crashed - waiting for file changes before starting...이렇게 나옵니다..
- 0
- 2
- 429
질문&답변
2022.11.05
db 생성과 seed data 에러 없이 넣었습니다.
mysql> show databases;+--------------------+| Database |+--------------------+| information_schema || mysql || performance_schema || sakila || sleact || sys || world |+--------------------+7 rows in set (0.00 sec) config.js 에서 host를 모두 localhost로 바꿨떠니 이제야 만들어지네요 127.0.0.1 이랑 localhost랑 같은것인줄 알았는데 이게 문제였나보네요..seed 데이터도 채널과 워크스페이스에 들어와 있습니다. 번거롭게 해드려서 죄송합니다.
- 0
- 4
- 525
질문&답변
2022.11.05
db 생성과 seed data 에러 없이 넣었습니다.
혹시 제가 clone을 하지 않고 전체 파일만 다운받아서 저장소를 새로 판 후에 거기에 옳겨넣어서 작업하고 있는데 이게 문제 일까요?
- 0
- 4
- 525
질문&답변
2022.11.05
db 생성과 seed data 에러 없이 넣었습니다.
이렇게 뜹니다.그리고 npm run dev -> db 연결 성공 뜹니다.그 다음에 seed 를 넣어봤는데 여러번 한 작업이라서 validation error 가 뜹니다. 이미지를 첨부하려했는데 이미지 업로드에 실패했다고 계속 떠서 이렇게 첨부합니다.. 참고로 config.js는 건들지 않았습니다.감사합니다.
- 0
- 4
- 525