ReferenceError: __dirname is not defined

132

ReferenceError: __dirname is not defined -

import path from 'path';
const __dirname = path.resolve();

__dirname is not defined -

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

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);

Comments

Submit
0 Comments