chaesunbak 님의 블로그
github: @https://github.com/chaesunbak
문제상황Next.js에서 페이지 인증 인가 기능 구현을 위해 미들웨어에서 jsonwebtoken 모듈을 사용하려고 했다.Error: The edge runtime does not support Node.js 'crypto' module.Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime원인Next.js 에서 미들웨어는 Node.js환경이 아닌 엣지 런타임 환경에서 돌아간다. 엣지 런타임 환경이란 Next.js에서 제공하는 경량화된 실행 환경이며, 일부 Node.js API만을 지원한다. 이는 미들웨어가 모든 요청을 가로채고 처리하는 만큼, 가능한 빠르고 가벼워야 함을 고려한 것이다.jsonwebtoken 모듈은 Node.js의..