I was using path module and while using it, I’d to use __dirname but it wasn’t working, I’m sure the path was correct that I provided.
Hey @chroventer I think I’m a little confused. The Node.js global __dirname
appears to work fine for me; adding console.log(__dirname);
to a trivial project shows me /app
in the console as I’d expect.
Are you trying to work with path.dirname()
? Can you provide some sample code or a project name?
1 Like
Hey @chroventer,
Can you show the piece of the code that is throwing an error?
This is so I can look into it and look what you’ve done wrong.
~Jarvo
I have tried logging dirname, still it doesn’t work.
Please provide some sample code or a project name, we can’t help you without that info.