process.stdout.write no output
I have no output in the stdout view, when doing
const spinner = [ '⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏' ];
process.stdout.write(" "+spinner[ (index+1)% spinner.length ]+"\r" );
When trying a similar example it's printing each character on a separate line. This is because the dashboard is treating each stream event as a new log entry. Are the characters not visible to you? Does it work without the dashboard?
@jasonwilson running node from shell, it will print out the char and feed back to line start) like in
const spinner = [ '⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏' ];
for(var count=0;count<100000;count++) process.stdout.write(" "+spinner[ (count+1)% spinner.length ]+"\033[0G" ); // \033[0G | \r | \x1B[0G
while in In node-dashboard it does not output to stdin
Unable to reproduce. WIth the first example
const spinner = [ '⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏' ];
process.stdout.write(" "+spinner[ (index+1)% spinner.length ]+"\r" );
I see nothing in stdout because it throws an error (index is not defined)
Second example
const spinner = [ '⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏' ];
for(var count=0;count<100000;count++) process.stdout.write(" "+spinner[ (count+1)% spinner.length ]+"\033[0G" );
I see something like this
my terminal doesn't recognize \033[0G but there's definitely text going to stdout
Closing this issue as it seems to be caused by code error. If this is not the case please comment.