From 59435c7b35e40241423a2a99043baf726b37abc0 Mon Sep 17 00:00:00 2001 From: Dillon Kearns Date: Thu, 22 Aug 2019 06:47:01 -0700 Subject: [PATCH] Use readline to avoid error in some node versions. --- generator/src/develop.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/generator/src/develop.js b/generator/src/develop.js index db549847..f08c2469 100644 --- a/generator/src/develop.js +++ b/generator/src/develop.js @@ -13,6 +13,7 @@ const ImageminPlugin = require("imagemin-webpack-plugin").default; const imageminMozjpeg = require("imagemin-mozjpeg"); const express = require("express"); const ClosurePlugin = require("closure-webpack-plugin"); +const readline = require("readline"); module.exports = { start, run }; function start({ routes, debug, manifestConfig }) { @@ -99,8 +100,8 @@ function roundToOneDecimal(n) { } function printProgress(progress, message) { - process.stdout.clearLine(); - process.stdout.cursorTo(0); + readline.clearLine(process.stdout); + readline.cursorTo(process.stdout, 0); process.stdout.write(`${progress} ${message}`); } function webpackOptions(production, routes, { debug, manifestConfig }) {