readline-promise
readline-promise copied to clipboard
Cannot await questionAsync method
I'm trying to do this:
const readline = require('readline-promise').default.createInterface({
input: process.stdin,
output: process.stdout,
terminal: false
});
const myFunc = async function(){
const q = "What is your favorite something?
const res = await readline.questionAsync(q)
console.log(res)
}
myFunc()
But after I give the answer, the execution stalls and the console.log() does not run
@dipapazacharias Not sure if you're still running into this, but I spun up a quick example based on your snippet and I am not running into the same issue...
https://repl.it/@brandongscott/RoundedAnimatedUnits