xxxxxxxxxx
__dirname is an environment variable that returns the absolute path of
the directory containing the currently executing file. The variable is
set only on backend Javascript runtime engines like Node.js and Rhino.
xxxxxxxxxx
import { dirname } from 'path';
import { fileURLToPath } from 'url';
const __dirname = dirname(fileURLToPath(import.meta.url));