Based on https://nodejs.org/api/esm.html#esm_no_filename_or_dirname , there is no __dirname available in ES modules in node.js. I edited the usage guide in the README.md file. Also Logical OR assignment (||=) is not supported in node.js v15.x lower, I added a comment to help with that too.
Based on https://nodejs.org/api/esm.html#esm_no_filename_or_dirname , there is no __dirname available in ES modules in node.js. I edited the usage guide in the README.md file. Also Logical OR assignment (||=) is not supported in node.js v15.x lower, I added a comment to help with that too.