node-progress icon indicating copy to clipboard operation
node-progress copied to clipboard

Not showing

Open khwerhahn opened this issue 9 years ago • 14 comments

Does the terminal need to have any special settings? Using zsh...

Nothing happens when I use the example in the repo.

khwerhahn avatar Aug 06 '15 15:08 khwerhahn

Nope nothing special, very weird, can you tell us anything more?

hallas avatar Aug 06 '15 15:08 hallas

Not really... Followed the example and the if (bar.complete) part works, but the progress bar doesn't show up

var ProgressBar = require('progress');

var bar = new ProgressBar(':bar', { total: 10 });
var timer = setInterval(function () {
  bar.tick();
  if (bar.complete) {
    console.log('\ncomplete\n');
    clearInterval(timer);
  }
}, 100);

khwerhahn avatar Aug 07 '15 07:08 khwerhahn

I just tested this is zsh on Mac OS X: zsh 5.0.5 (x86_64-apple-darwin14.0)

What does your "zsh --version" give you?

hallas avatar Aug 07 '15 09:08 hallas

Same version.

khwerhahn avatar Aug 10 '15 20:08 khwerhahn

Well maybe some kind of setting you have on then?

hallas avatar Aug 10 '15 20:08 hallas

the progressbar shows in cmd window, but doesn't show in webstorm ide's console on windows, any thing wrong?

wzshuang avatar Nov 11 '15 01:11 wzshuang

@wzshuang as far as I know it has to do with the way it draws and webstorms terminal emulation which is not displaying a raw terminal. I have similar results with testing suites etc.

I dont believe it is something that we can affect from within the code.

nullivex avatar Nov 11 '15 01:11 nullivex

@nullivex I debuged the code and note that 'this.stream.isTTY' is undefined, I don't know what TTY is, I will google it.

wzshuang avatar Nov 11 '15 01:11 wzshuang

@wzshuang did you change the context of this?

hallas avatar Nov 11 '15 15:11 hallas

@hallas no, I didn't change the source code, just debug it.

wzshuang avatar Nov 11 '15 16:11 wzshuang

I'm having the same issue on Linux (Elementary OS -Freya-)

ishmangit avatar Jan 25 '16 11:01 ishmangit

Hello! Thank you for this great module.

Just stumbled upon this problem too. Trying to use it in WebStorm IDE, but it's not rendering. Are there any news on this? It would be very convenient to be able to see the progress inside of the IDE window.

Maybe we could send a bug report to JetBrains team? Sadly, I'm not familiar with the implementation details in order to do it myself.

slavafomin avatar Sep 07 '17 14:09 slavafomin

A long time has passed since but... In short, the issue with WebStrom is that console there isn't TTY that is required for progress to work.

There is a workaround for that (not without some tradeoffs). Take a look at the latest comment from Sergey Simonchik on JetBrains tracker.

https://youtrack.jetbrains.com/issue/WEB-1933

Quote:

Fixed in WebStorm 2018.2 if nodejs.console.use.terminal registry key is enabled - for that, please do the following:

  • "Help | Find Action..." on the main menu;
  • Type "registry" and click "Registry..." found element;
  • Find nodejs.console.use.terminal key and enable it.

wanjas avatar May 08 '19 05:05 wanjas

Thank you for finding that @wanjas.

zjr avatar Jun 12 '19 15:06 zjr