androidjs-builder
androidjs-builder copied to clipboard
NodeJS Error/Fix process.stdout.clearLine not found
Error occurs in node 14.x. process.stdout.clearLine and cursorTo not found ...
Fix: ProgressBar.js
class LoadingBar { constructor() { this.interval = 100; this.currentIndex = 0; this.fill = '█'; this.empty = '⣿'; this.bar_length = 50; this.loop = null; this.flip = 1; this.chunksDownloaded = "0"; this.isRunning = false; this.success = ' √'; this.failed = ' X'; this.message = ''; this.messageSize = 0; } reset() { this.constructor(); } next() { this.clear(); this.currentIndex += this.flip; if (this.currentIndex === this.bar_length || this.currentIndex === 0) { this.flip *= -1; } let _left = this.currentIndex - 1; _left = _left 0) process.stdout.write('\b'.repeat(this.messageSize)); } } . . . .