We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I suspect that the problem is that process.stdin is still referenced. See this SO answer.
process.stdin
I have tried another approach using readline:
readline
const readline = require('readline'); function prompt(msg){ return new Promise((resolve, reject) => { const rl = readline.createInterface({ input: process.stdin, output: process.stdout }); rl.question(msg, (answer) => { rl.close(); resolve(answer); }); }); }
What do you think?
The text was updated successfully, but these errors were encountered:
You need to explicitly pause stdin after using co-prompt with the following code, at the end of your execution flow:
co-prompt
// Gotta pause stdin after we're done so it doesn't look like the process is stuck process.stdin.pause();
Sorry, something went wrong.
should this be added to the documentation? The need to add a process.stdin.pause();?
process.stdin.pause();
No branches or pull requests
I suspect that the problem is that
process.stdin
is still referenced. See this SO answer.I have tried another approach using
readline
:What do you think?
The text was updated successfully, but these errors were encountered: