오류가 나서 질문을 드립니다.
448
작성한 질문수 2
auth.js 입니다.

답변 4
0
한글을 넣고 싶으시면 model에서 sequelize.define의 두 번째 인수(옵션 객체)에 다음 두 개를 넣으셔야 합니다(테이블을 지웠다가 다시 생성하셔야 합니다)
charset:'utf8',
collate:'utf8_general_ci',
0
음 일단 auth.js 에서 생기는 오류는 해결하였습니다.
하지만 error.pug에서 생기는 오류와 DB오류가 생기는거 같은대.. 이것들은 어떻게 해야될까요?
DatabaseError [SequelizeDatabaseError]: Incorrect string value: '\xEC\x9D\xB4\xEC\x9B\x90...' for column 'nick' at row 1
at Query.formatError (C:\Users\DELL\Desktop\nodebird\node_modules\sequelize\lib\dialects\mysql\query.js:244:16)
at Execute.handler [as onResult] (C:\Users\DELL\Desktop\nodebird\node_modules\sequelize\lib\dialects\mysql\query.js:51:23)
at Execute.execute (C:\Users\DELL\Desktop\nodebird\node_modules\mysql2\lib\commands\command.js:30:14)
at Connection.handlePacket (C:\Users\DELL\Desktop\nodebird\node_modules\mysql2\lib\connection.js:417:32)
at PacketParser.onPacket (C:\Users\DELL\Desktop\nodebird\node_modules\mysql2\lib\connection.js:75:12)
at PacketParser.executeStart (C:\Users\DELL\Desktop\nodebird\node_modules\mysql2\lib\packet_parser.js:75:16)
at Socket.<anonymous> (C:\Users\DELL\Desktop\nodebird\node_modules\mysql2\lib\connection.js:82:25)
at Socket.emit (events.js:223:5)
at addChunk (_stream_readable.js:309:12)
at readableAddChunk (_stream_readable.js:290:11)
at Socket.Readable.push (_stream_readable.js:224:10)
at TCP.onStreamRead (internal/stream_base_commons.js:181:23) {
name: 'SequelizeDatabaseError',
parent: Error: Incorrect string value: '\xEC\x9D\xB4\xEC\x9B\x90...' for column 'nick' at row 1
at Packet.asError (C:\Users\DELL\Desktop\nodebird\node_modules\mysql2\lib\packets\packet.js:712:17)
at Execute.execute (C:\Users\DELL\Desktop\nodebird\node_modules\mysql2\lib\commands\command.js:28:26)
at Connection.handlePacket (C:\Users\DELL\Desktop\nodebird\node_modules\mysql2\lib\connection.js:417:32)
at PacketParser.onPacket (C:\Users\DELL\Desktop\nodebird\node_modules\mysql2\lib\connection.js:75:12)
at PacketParser.executeStart (C:\Users\DELL\Desktop\nodebird\node_modules\mysql2\lib\packet_parser.js:75:16)
at Socket.<anonymous> (C:\Users\DELL\Desktop\nodebird\node_modules\mysql2\lib\connection.js:82:25)
at Socket.emit (events.js:223:5)
at addChunk (_stream_readable.js:309:12)
at readableAddChunk (_stream_readable.js:290:11)
at Socket.Readable.push (_stream_readable.js:224:10)
at TCP.onStreamRead (internal/stream_base_commons.js:181:23) {
code: 'ER_TRUNCATED_WRONG_VALUE_FOR_FIELD',
errno: 1366,
sqlState: 'HY000',
sqlMessage: "Incorrect string value: '\\xEC\\x9D\\xB4\\xEC\\x9B\\x90...' for column 'nick' at row 1",
sql: 'INSERT INTO `users` (`id`,`email`,`nick`,`password`,`provider`,`createdAt`,`updatedAt`) VALUES (DEFAULT,?,?,?,?,?,?);',
parameters: [
'kitti0418@naver.com',
'이원제',
'$2b$12$fas7/Kr7tMyQkL95o2CBPuuJklvekQOqGuRuXPdo9jRgsk60TLwLu',
'local',
'2020-06-08 22:16:38',
'2020-06-08 22:16:38'
]
},
original: Error: Incorrect string value: '\xEC\x9D\xB4\xEC\x9B\x90...' for column 'nick' at row 1
at Packet.asError (C:\Users\DELL\Desktop\nodebird\node_modules\mysql2\lib\packets\packet.js:712:17)
at Execute.execute (C:\Users\DELL\Desktop\nodebird\node_modules\mysql2\lib\commands\command.js:28:26)
at Connection.handlePacket (C:\Users\DELL\Desktop\nodebird\node_modules\mysql2\lib\connection.js:417:32)
at PacketParser.onPacket (C:\Users\DELL\Desktop\nodebird\node_modules\mysql2\lib\connection.js:75:12)
at PacketParser.executeStart (C:\Users\DELL\Desktop\nodebird\node_modules\mysql2\lib\packet_parser.js:75:16)
at Socket.<anonymous> (C:\Users\DELL\Desktop\nodebird\node_modules\mysql2\lib\connection.js:82:25)
at Socket.emit (events.js:223:5)
at addChunk (_stream_readable.js:309:12)
at readableAddChunk (_stream_readable.js:290:11)
at Socket.Readable.push (_stream_readable.js:224:10)
at TCP.onStreamRead (internal/stream_base_commons.js:181:23) {
code: 'ER_TRUNCATED_WRONG_VALUE_FOR_FIELD',
errno: 1366,
sqlState: 'HY000',
sqlMessage: "Incorrect string value: '\\xEC\\x9D\\xB4\\xEC\\x9B\\x90...' for column 'nick' at row 1",
sql: 'INSERT INTO `users` (`id`,`email`,`nick`,`password`,`provider`,`createdAt`,`updatedAt`) VALUES (DEFAULT,?,?,?,?,?,?);',
parameters: [
'kitti0418@naver.com',
'이원제',
'$2b$12$fas7/Kr7tMyQkL95o2CBPuuJklvekQOqGuRuXPdo9jRgsk60TLwLu',
'local',
'2020-06-08 22:16:38',
'2020-06-08 22:16:38'
]
},
sql: 'INSERT INTO `users` (`id`,`email`,`nick`,`password`,`provider`,`createdAt`,`updatedAt`) VALUES (DEFAULT,?,?,?,?,?,?);',
parameters: [
'kitti0418@naver.com',
'이원제',
'$2b$12$fas7/Kr7tMyQkL95o2CBPuuJklvekQOqGuRuXPdo9jRgsk60TLwLu',
'local',
'2020-06-08 22:16:38',
'2020-06-08 22:16:38'
]
}
Error: C:\Users\DELL\Desktop\nodebird\views\error.pug:2:1
Declaration of template inheritance ("extends") should be the first thing in the file. There can only be one extends statement per file.
at makeError (C:\Users\DELL\Desktop\nodebird\node_modules\pug-error\index.js:34:13)
at error (C:\Users\DELL\Desktop\nodebird\node_modules\pug-linker\index.js:7:30)
at C:\Users\DELL\Desktop\nodebird\node_modules\pug-linker\index.js:198:9
at walkAST (C:\Users\DELL\Desktop\nodebird\node_modules\pug-walk\index.js:26:18)
at C:\Users\DELL\Desktop\nodebird\node_modules\pug-walk\index.js:112:20
at Array.reduce (<anonymous>)
at walkAndMergeNodes (C:\Users\DELL\Desktop\nodebird\node_modules\pug-walk\index.js:111:18)
at walkAST (C:\Users\DELL\Desktop\nodebird\node_modules\pug-walk\index.js:40:19)
at checkExtendPosition (C:\Users\DELL\Desktop\nodebird\node_modules\pug-linker\index.js:193:3)
at link (C:\Users\DELL\Desktop\nodebird\node_modules\pug-linker\index.js:19:5)
at compileBody (C:\Users\DELL\Desktop\nodebird\node_modules\pug\lib\index.js:192:9)
at Object.exports.compile (C:\Users\DELL\Desktop\nodebird\node_modules\pug\lib\index.js:267:16)
at handleTemplateCache (C:\Users\DELL\Desktop\nodebird\node_modules\pug\lib\index.js:240:25)
at Object.exports.renderFile (C:\Users\DELL\Desktop\nodebird\node_modules\pug\lib\index.js:452:10)
at Object.exports.renderFile (C:\Users\DELL\Desktop\nodebird\node_modules\pug\lib\index.js:442:21)
at View.exports.__express [as engine] (C:\Users\DELL\Desktop\nodebird\node_modules\pug\lib\index.js:491:11)
at View.render (C:\Users\DELL\Desktop\nodebird\node_modules\express\lib\view.js:135:8)
at tryRender (C:\Users\DELL\Desktop\nodebird\node_modules\express\lib\application.js:640:10)
at Function.render (C:\Users\DELL\Desktop\nodebird\node_modules\express\lib\application.js:592:3)
at ServerResponse.render (C:\Users\DELL\Desktop\nodebird\node_modules\express\lib\response.js:1012:7)
at C:\Users\DELL\Desktop\nodebird\app.js:55:7
at Layer.handle_error (C:\Users\DELL\Desktop\nodebird\node_modules\express\lib\router\layer.js:71:5)
POST /auth/join 500 329.197 ms - 2591
실제 서비스에서도 cluster를 사용하나요?
1
313
2
캐싱에 관하여
0
279
3
salt를 실무에서 사용할때 항상 randomBytes로 만들어줘야 하나요?
0
347
1
게시물 올리기 오류
0
408
1
캐슁 이후 로그인창
0
266
1
kakao passport 질문있습니다.
0
493
3
global객체 공유 질문드립니다.
1
417
1
서버가 죽어버리네요
0
1047
8
포링키 문제..
0
234
2
커넥션 플래시 설치문제
0
216
2
익스프레스 제너레이터? 설치문제
0
2586
6
redis 질문입니다.
0
305
1
9장 세션을 DB에 저장시 리다이렉션 오류 발생
0
874
8
프레임워크 선택에 관하여 질문이 있습니다.
0
300
3
시퀄라이즈 질문입니다 ! !
0
588
1
리뉴얼 강의 12강 socket.io에서 req.session접근 관련 질문
0
922
6
oAuth 질문입니다.
0
356
3
GCP 질문입니다.
0
366
1
Passport 모듈 로그인 구현관련
0
720
6
카카오 로그인 관련 질문입니다!!
0
606
4
스스로 해보기 10-16 nunjuncks 질문있습니다
0
499
5
제로초님 HTTP 완벽가이드 추천해주신거 너무 잘 읽었습니다.
0
317
2
gif채팅방 nunjucks관련 질문입니다!
0
337
3
현영님 몽고db관련 질문입니다.
0
233
3






