req.session.key="키입니다."
와 같이 세션에 저장하려니 아래와 같은 오류가 발생하였다.
[ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string or an instance of Buffer or Uint8Array. Received an instance of Array
현재 connect-redis
모듈과 node-redis
모듈 간의 호환이 되지 않아서 생긴 문제였다.
legacyMode: true
이 코드를 추가 해주면 된다.
const client = createClient({
legacyMode: true
});