node.js stdout clearline() and cursorTo() functions

前端 未结 5 1990
没有蜡笔的小新
没有蜡笔的小新 2020-12-25 12:11

From a node.js tutorial, I see those two process.stdout functions :

process.stdout.clearLine();
process.stdout.cursorTo(0);

But I\'m using

5条回答
  •  [愿得一人]
    2020-12-25 12:32

    if you see stdout exceptions like TypeError: process.stdout.clearLine is not a function in Debug Console window of Visual Studio Code (or Webstorm), run the app as external terminal application instead of internal console. The reason is that Debug Console window is not TTY (process.stdout.isTTY is false). Therefore update your launch configuration in launch.json with "console": "externalTerminal" option.

提交回复
热议问题