Home > Blockchain >  process.mainModule is deprecated in nodejs
process.mainModule is deprecated in nodejs

Time:09-22

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?

CodePudding user response:

Chances are you want one of these.

  • Related