How can I use
process.cwd()
within Angular2 Component with TypeScript? What do I have to import?
The following in the constructor
console.log("Where I am: ", process.cwd());
outputs the error:
ORIGINAL EXCEPTION: ReferenceError: process is not defined
ORIGINAL STACKTRACE:
ReferenceError: process is not defined
As I could use process.cwd() and __dirname natively in my JavaScript files, I am wondering, why it does not work instantly?
What do I have to import? Is it my addiction to nodeJS? Or my wrong assumptions: what in node works must work everywhere?