본문 바로가기

nodejs20

throw new TypeError('JwtStrategy requires a secret or key'); Error: throw new TypeError('JwtStrategy requires a secret or key'); jwt_secret 을 읽지 못해서 발생하는 에러. .env 파일 확인 jwt_secret 변수 확인 .env 파일 위치가 env.js 에서 읽으려는 위치와 일치하는지 폴더 구조 확인 // 3번째 방법으로 해결됐다. 2020. 3. 8.
GraphQL | Field 'email' is not defined in the input type 'UserWhereUniqueInput'. error> { Error: Variable '$where' expected value of type 'UserWhereUniqueInput!' but got: {"email":"kay@gmail.com"}. Reason: 'email' Field 'email' is not defined in the input type 'UserWhereUniqueInput'. (line 1, column 36): mutation ($data: UserUpdateInput!, $where: UserWhereUniqueInput!) solution> datamodel.prisma > userName: String! @unique email: String! @unique @unique 를 추가함. 2020. 2. 1.
TIL D-09 throw new TypeError('Router.use() requires a middleware function but got a ' + gettype(fn)) 에러: throw new TypeError('Router.use() requires a middleware function but got a ' + gettype(fn)) ^ TypeError: Router.use() requires a middleware function but got a Object 해결방법: //api.js 파일에 아래 코드 추가 module.exports = router; 참고: https://stackoverflow.com/questions/27465850/typeerror-router-use-requires-middleware-function-but-got-a-object 2020. 1. 14.
Nodejs 에러 | cannot read property 'expires' of undefined 에러> TypeError: Cannot read property 'expires' of undefined 해결방법> 서버를 껐다가 다시 켰다. 2019. 12. 31.
Nodejs 에러 | ERR_INVALID_CHAR 에러> TypeError [ERR_INVALID_CHAR]: Invalid character in header content ["Set-Cookie"] 문제 발생한 코드> const http = require('http'); const fs = require('fs'); const url = require('url'); const qs = require('querystring'); const parseCookies = (cookie = '') => cookie .split(';') .map(v => v.split('=')) .map(([k, ...vs]) => [k, vs.join('=')]) .reduce((acc, [k,v]) => { acc[k.trim()] = decodeURIComponent(v.. 2019. 12. 31.
TIL D-49 Nodejs 라우팅 이미지 부르기 2019.12.20(금) 오늘 배운 것> 썸네일 바꾸는 라우터 게시글 상세조회시 이미지 부르기 내일 공부할 것> 오늘의 생각> 더보기 -어제 기업가센터 송년회, 우리팀 내부 송년회를 에어비앤비에서 1박2일로 진행했다. 송년회는 기대 이상으로 서로 간에 진솔한 얘기를 나눌 수 있었던 것 같아 좋았다. -다음날(오늘)은 아침부터 바로 코엑스에 가서 서일페 시장조사를 했고, 핸드메이드 페어에 참가중인 디자이너 친구를 보러 핸드메이드 페어도 참여하였다. 사람도 너무 많고, 가방도 노트북에 아이패드, 잠옷 등으로 너무 짐덩어리였다. 다음에 코엑스에 갈 때는 무조건 가볍게 가야겠다. -서일페는 생각보다 나와 딱 취향이 겹치지 않아서 더욱 즐기기 어려웠다. 내가 생각한 굿즈와는 다른 느낌. 그리고 나는 그렇게 가서 .. 2019. 12. 20.