process.mainModule is deprecated in nodejs

Viewed 938
module.exports = path.dirname(process.mainModule.filename)

Main Module Deprecated

process.mainModule.filename is deprecated in nodejs. Is there any alternative method to get a current directory of the file?

1 Answers
Related