-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
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
Input prompt takes last answer on Nodejs 4.0.0 #282
Comments
Inquirer is asynchronous. You cannot run two prompt at the same time. |
Hi @SBoudrias , var inquirer = require("inquirer");
var question1 = {
type: "input",
message: "Enter something: ",
name: "Failing_Node_4.0.0"
}
inquirer.prompt([question1], function( answers ) {
// Use user feedback for... whatever!!
console.log("First inquirer answered:", answers);
inquirer.prompt([question1], function( answers ) {
// Use user feedback for... whatever!!
console.log("Second inquirer answered:", answers);
});
}); It is working fine on Node 0.12.x, but not on Node 4.0.0. The second inquirer calls the answers callback and accepts the same answer. After that the console is not released, it keeps waiting for input I think. |
Just to add something - the second inquirer does not accept the same answer - it receives empty string as an answer. |
A bug similar to it. It works fine except Node 4.0.0. Arrow keys does not work in windows prompt. var inquirer = require('inquirer');
inquirer.prompt([
{
type: "list",
name: 'test',
message: "test?",
choices: [
'A',
new inquirer.Separator(),
'B',
new inquirer.Separator(),
'C'
]
}
]); |
I have the same issue. I was trying to install Semantic UI, which uses gulp-prompt, which in turn uses Inquirer.js. My solution was to use Node.js 0.12.7 via nvm-windows, install Semantic UI, and then go back to using Node 4.0.0. |
Hey guys, I'll need more details because I just tested this on Window 10 (cmd.exe and Node 4.0) and everything is working fine. I also copied your code example verbatim and it's working fine. So please retry with the latest Inquirer version. Then give me:
|
Nevermind, issue fixed when updated to node v4.1.1This worked great on
I ran an
Same problem as above. The arrow keys do not move up and down. I can hit enter and select the first entry. |
I'm going to close this issue as #266 have more feedback and is tracking the issue on Node side. Please continue further conversation over there. |
I actually have the same issue in Node 5.1.0 |
Same. I also have the issue on Node 5.6.0 |
Same issue. Node v.5.11.0 |
Same issue with 5.10.1 here |
Hi,
I've just tried using inquirer with latest Node - 4.0.0 and I've found an issue with consecutive input prompts. Here's the test case:
When I enter some value in the first prompt, my answer is used for it and for the second input, so it is automatically resolved. I've tried this on Windows (cmd and Git Bash) and on Linux.
Same issue is reproduced with iojs 3.3.0 (tested on Linux only).
The text was updated successfully, but these errors were encountered: