SyntaxFix
Write A Post
Hire A Developer
Questions
path.resolve('.') is also a reliable and clean option, because we almost always require('path'). It will give you absolute path of the directory from where it is called.
path.resolve('.')
require('path')