1

I'm trying to run a js file containing just one simple line:

\\file.js
console.log("a");

And redirect it into a txt file, like this:

node file.js > txt

File gets created but empty. If I execute the file without redirecting stdout, it prints correctly into the console.

If I execute anything else, such as:

echo "a" > txt

It also works.

This reproduces only on one Ubuntu 20.04 instance, hosted by Njal.la. Node installed using snap, v 16.15.1.

Corina
  • 15
  • 7

0 Answers0