From the node manual I see that I can get the directory of a file with __dirname, but from the REPL this seems to be undefined. Is this a misunderstanding on my
__dirname
In ES6 use:
import path from 'path'; const __dirname = path.resolve();
also available when node is called with --experimental-modules
--experimental-modules