I want to use the readline function to get input. But when using this function, this error is displayed. What is the problem?
const readline = require("readline").createInterface({
input: process.stdin,
output: process.stdout,
});
readline.question(`What's your name?`, (name) => {
console.log(`Hi ${name}!`);
readline.close();
})