I have the next problem, I am using typescript with modules in a nodejs project, but my problem is that I need to use dirname in a part of my project and I knew a way to implement it when I use modules in my backend of nodejs, but now that I am using typescript I got an error when I try to implement the solution or when I even just use import.meta: “The ‘import.meta’ meta-property is not allowed in files which will build into CommonJS output.ts(1470)”. So, someone knows how to solve it or an altenative for it.
Sebastian Antonio Chavira Chac is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.