How to solve __dirname in node js So basically I have a simple code which is calling __dirname in console.log. But I am meeting an error and can not find a solution for it…