Trying to get the directory path of my current script in NodeJs using "__dirname". I'm getting Reference Error. What can be wrong
Here's the code (though it's part of a larger code base):
import path from 'path'
console.log(__dirname)
Trying to get the directory path of my current script in NodeJs using "__dirname". I'm getting Reference Error. What can be wrong
Here's the code (though it's part of a larger code base):
import path from 'path'
console.log(__dirname)