에러 코드 포털
Node.jsNode.js오류 코드

ERR_REQUIRE_CYCLE_MODULE

require cycle module

Node.js 런타임 또는 API 호출에서 보고한 오류. 공식 설명과 호출 인수, 스택 추적을 함께 확인하세요.

When trying to require() an ES Module, a CommonJS to ESM or ESM to CommonJS edge participates in an immediate cycle. This is not allowed because ES Modules cannot be evaluated while they are already being evaluated. To avoid the cycle, the require() call involved in a cycle should not happen at the top-level of either an ES Module (via createRequire()) or a CommonJS module, and should be done lazily in an inner function.

해결·진단 링크

문서의 제품·버전·발생 환경이 현재 상황과 일치하는지 먼저 확인하세요.