__filename is not defined (node.js)
So I was searching for JavaScript variable thats return file name and I found
__filename
. Problem started when I wanted to use it and it returned an error:
I read that, it don't need to import anything but if it needs, please tell me it or different way to return name of file.
-# Please ping in reply3 Replies
⌛
This post has been reserved for your question.
Hey @TunableYapper! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
This is not a JavaScript server. Java and JavaScript are completely different languages. See: How is JavaScript different from Java?
Post Closed
This post has been closed by <@358291050957111296> for the following reason:
Java is not the same as JavaScript - this is a Java server