작성
·
284
0
TypeError: res.status is not a function
새로 고침하면 저 에러가 계속 생기네요.
테스트 아이디로 로그인을 시도해도 같은 에러가 생깁니다.
https://github.com/Nimble9/lecture-vue-trello.git
답변 3
0
저도 비슷한 현상을 겪었는데요,
제 경우는 api 호출시 HTTP method 지정을 잘못한 부분이 있었습니다.
(예 : get method로 정의된 api를 post로 호출함)
0
[nodemon] 1.17.5
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node index.js`
Executing (default): DROP TABLE IF EXISTS `cards`;
Executing (default): DROP TABLE IF EXISTS `lists`;
Executing (default): DROP TABLE IF EXISTS `boards`;
Executing (default): DROP TABLE IF EXISTS `users`;
Executing (default): DROP TABLE IF EXISTS `users`;
Executing (default): CREATE TABLE IF NOT EXISTS `users` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `email` VARCHAR(255) UNIQUE, `password` VARCHAR(255), `name` VARCHAR(255), `createdAt` DATETIME NOT NULL, `updatedAt` DATETIME NOT NULL);
Executing (default): PRAGMA INDEX_LIST(`users`)
Executing (default): PRAGMA INDEX_INFO(`sqlite_autoindex_users_1`)
Executing (default): DROP TABLE IF EXISTS `boards`;
Executing (default): CREATE TABLE IF NOT EXISTS `boards` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `title` VARCHAR(255), `bgColor` VARCHAR(255) DEFAULT 'rgb(0, 121, 191)', `createdAt` DATETIME NOT NULL, `updatedAt` DATETIME NOT NULL, `userId` INTEGER REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE);
Executing (default): PRAGMA INDEX_LIST(`boards`)
Executing (default): DROP TABLE IF EXISTS `lists`;
Executing (default): CREATE TABLE IF NOT EXISTS `lists` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `title` VARCHAR(255), `pos` DOUBLE PRECISION DEFAULT 65535, `createdAt` DATETIME NOT NULL, `updatedAt` DATETIME NOT NULL, `boardId` INTEGER REFERENCES `boards` (`id`) ON DELETE SET NULL ON UPDATE CASCADE);
Executing (default): PRAGMA INDEX_LIST(`lists`)
Executing (default): DROP TABLE IF EXISTS `cards`;
Executing (default): CREATE TABLE IF NOT EXISTS `cards` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `title` VARCHAR(255), `description` TEXT, `pos` DOUBLE PRECISION DEFAULT 65535, `createdAt` DATETIME NOT NULL, `updatedAt` DATETIME NOT NULL, `listId` INTEGER REFERENCES `lists` (`id`) ON DELETE SET NULL ON UPDATE CASC
ADE);
Executing (default): PRAGMA INDEX_LIST(`cards`)
Executing (default): INSERT INTO `users` (`id`,`email`,`password`,`name`,`createdAt`,`updatedAt`) VALUES (NULL,'test@test.com','123123','Chris','2021-01-15 08:18:11.587 +00:00','2021-01-15 08:18:11.587 +00:00');
Executing (default): INSERT INTO `boards` (`id`,`title`,`bgColor`,`createdAt`,`updatedAt`,`userId`) VALUES (NULL,'Sample Board','rgb(0, 121, 191)','2021-01-15 08:18:11.660 +00:00','2021-01-15 08:18:11.660 +00:00',1);
server is running localhost:3000
GET / 200 20.534 ms - 2662
Error: not found
at app.use (D:\person\@lecture\인프런\lecture-vue-trello\tmp\lecture-vue-trello-server\app.js:45:8)
at Layer.handle [as handle_request] (D:\person\@lecture\인프런\lecture-vue-trello\tmp\lecture-vue-trello-server\node_modules\express\lib\router\layer.js:95:5)
at trim_prefix (D:\person\@lecture\인프런\lecture-vue-trello\tmp\lecture-vue-trello-server\node_modules\express\lib\router\index.js:317:13)
at D:\person\@lecture\인프런\lecture-vue-trello\tmp\lecture-vue-trello-server\node_modules\express\lib\router\index.js:284:7
at Function.process_params (D:\person\@lecture\인프런\lecture-vue-trello\tmp\lecture-vue-trello-server\node_modules\express\lib\router\index.js:335:12)
at next (D:\person\@lecture\인프런\lecture-vue-trello\tmp\lecture-vue-trello-server\node_modules\express\lib\router\index.js:275:10)
at SendStream.error (D:\person\@lecture\인프런\lecture-vue-trello\tmp\lecture-vue-trello-server\node_modules\serve-static\index.js:121:7)
at SendStream.emit (events.js:198:13)
at SendStream.error (D:\person\@lecture\인프런\lecture-vue-trello\tmp\lecture-vue-trello-server\node_modules\send\index.js:270:17)
at SendStream.onStatError (D:\person\@lecture\인프런\lecture-vue-trello\tmp\lecture-vue-trello-server\node_modules\send\index.js:421:12)
at onstat (D:\person\@lecture\인프런\lecture-vue-trello\tmp\lecture-vue-trello-server\node_modules\send\index.js:727:26)
at FSReqWrap.oncomplete (fs.js:153:21)
GET /favicon.ico 500 4.116 ms - 2728
TypeError: res.status is not a function
at app.use (D:\person\@lecture\인프런\lecture-vue-trello\tmp\lecture-vue-trello-server\app.js:50:7)
at Layer.handle_error (D:\person\@lecture\인프런\lecture-vue-trello\tmp\lecture-vue-trello-server\node_modules\express\lib\router\layer.js:71:5)
at trim_prefix (D:\person\@lecture\인프런\lecture-vue-trello\tmp\lecture-vue-trello-server\node_modules\express\lib\router\index.js:315:13)
at D:\person\@lecture\인프런\lecture-vue-trello\tmp\lecture-vue-trello-server\node_modules\express\lib\router\index.js:284:7
at Function.process_params (D:\person\@lecture\인프런\lecture-vue-trello\tmp\lecture-vue-trello-server\node_modules\express\lib\router\index.js:335:12)
at next (D:\person\@lecture\인프런\lecture-vue-trello\tmp\lecture-vue-trello-server\node_modules\express\lib\router\index.js:275:10)
at app.use (D:\person\@lecture\인프런\lecture-vue-trello\tmp\lecture-vue-trello-server\app.js:45:3)
at Layer.handle [as handle_request] (D:\person\@lecture\인프런\lecture-vue-trello\tmp\lecture-vue-trello-server\node_modules\express\lib\router\layer.js:95:5)
at trim_prefix (D:\person\@lecture\인프런\lecture-vue-trello\tmp\lecture-vue-trello-server\node_modules\express\lib\router\index.js:317:13)
at D:\person\@lecture\인프런\lecture-vue-trello\tmp\lecture-vue-trello-server\node_modules\express\lib\router\index.js:284:7
at Function.process_params (D:\person\@lecture\인프런\lecture-vue-trello\tmp\lecture-vue-trello-server\node_modules\express\lib\router\index.js:335:12)
at next (D:\person\@lecture\인프런\lecture-vue-trello\tmp\lecture-vue-trello-server\node_modules\express\lib\router\index.js:275:10)
at SendStream.error (D:\person\@lecture\인프런\lecture-vue-trello\tmp\lecture-vue-trello-server\node_modules\serve-static\index.js:121:7)
at SendStream.emit (events.js:198:13)
at SendStream.error (D:\person\@lecture\인프런\lecture-vue-trello\tmp\lecture-vue-trello-server\node_modules\send\index.js:270:17)
at SendStream.onStatError (D:\person\@lecture\인프런\lecture-vue-trello\tmp\lecture-vue-trello-server\node_modules\send\index.js:421:12)
at onstat (D:\person\@lecture\인프런\lecture-vue-trello\tmp\lecture-vue-trello-server\node_modules\send\index.js:727:26)
at FSReqWrap.oncomplete (fs.js:153:21)
0