node-progress
node-progress copied to clipboard
Not showing
Does the terminal need to have any special settings? Using zsh...
Nothing happens when I use the example in the repo.
Nope nothing special, very weird, can you tell us anything more?
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);
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?
Same version.
Well maybe some kind of setting you have on then?
the progressbar shows in cmd window, but doesn't show in webstorm ide's console on windows, any thing wrong?
@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 I debuged the code and note that 'this.stream.isTTY' is undefined, I don't know what TTY is, I will google it.
@wzshuang did you change the context of this?
@hallas no, I didn't change the source code, just debug it.
I'm having the same issue on Linux (Elementary OS -Freya-)
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.
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.
Thank you for finding that @wanjas.