Skip to main content
deleted 1 character in body
Source Link
Ronnie Smith
  • 18.8k
  • 7
  • 89
  • 99

This works:

import path from 'node:path'; import url from 'node:url'; const __dirnameDIR_NAME = path.dirname(url.fileURLToPath(import.meta.url)); 

This works:

import path from 'node:path'; import url from 'node:url'; const __dirname = path.dirname(url.fileURLToPath(import.meta.url)); 

This works:

import path from 'node:path'; import url from 'node:url'; const DIR_NAME = path.dirname(url.fileURLToPath(import.meta.url)); 
Source Link
Ronnie Smith
  • 18.8k
  • 7
  • 89
  • 99

This works:

import path from 'node:path'; import url from 'node:url'; const __dirname = path.dirname(url.fileURLToPath(import.meta.url));