Answers for "Why is dirname not defined in node api?"

0

Why is dirname not defined in node api?

import { fileURLToPath } from 'url';
import { dirname } from 'path';

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
Posted by: Guest on June-26-2021

Code answers related to "Why is dirname not defined in node api?"

Browse Popular Code Answers by Language