chaesunbak 님의 블로그
close
프로필 사진

chaesunbak 님의 블로그

github: @chaesunbak

  • 분류 전체보기 (25)
    • 회고 (9)
    • 트러블슈팅 (4)
    • 위키 (6)
    • 후기 (3)
    • 분석 (3)
  • 홈
  • 태그
  • GitHub
Error: The edge runtime does not support Node.js 'crypto' module. : Next.js 미들웨어의 엣지 런타임 환경

Error: The edge runtime does not support Node.js 'crypto' module. : Next.js 미들웨어의 엣지 런타임 환경

문제상황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의..

  • format_list_bulleted 트러블슈팅
  • · 2025. 2. 18.
  • navigate_before
  • 1
  • 2
  • 3
  • 4
  • 5
  • navigate_next
Copyright © chaesunbak 모든 권리 보유.

티스토리툴바