Using require in ESM Node.js

import { createRequire } from 'module'


const require = createRequire(import.meta.url);