I have a problem on line 6 of my code where __dirname is not defined. It is probably obvious but I have little js experience.
There are no issues with your code, it's a minor repl.it bug, a quick workaround would be to declare a new constant named
dirname set it's value to
'/home/runner' and use
dirname instead of