설정을 module로 해두고 아래와 같이 작업 중 에러가 발생하였다. import path from 'path'; const directoryPath = path.join(__dirname, "../router/api"); 위의 에러는 es 모듈 환경에서는 __dirname이 존재하지 않기 때문에 발생하는 문제이다. 이를 해결할 수 있는 두가지 방안이 있다. 1. import path from 'path'; import { fileURLToPath } from "url"; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); const directoryPath = path.join(__di..