-
-
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
Using 'list' as the first input to a prompt fails #266
Comments
Which version of inquirer? |
Woops, sorry, 0.9.0 from |
Have you been able to reproduce the issue or look into it? I've confirmed that it still occurs on io.js What's curious to me is that |
@LPGhatguy does it work with inquirer 0.8.0? |
@SBoudrias It does not. |
This bug does not occur on OS X as far as I can tell, so it's probably something Windows specific. |
Same issue, it works on node 0.10.40 |
This is still an issue with windows 12 node 4.0.0..... in both command prompt and in powershell |
Now that node 4.0 is the mainline release, this issue might affect more users. |
@LPGhatguy I don't have easy access to a windows machine. This seems to be a big issue for you, it'd be nice if you investigate and send a fix as a PR. |
@SBoudrias Is there any news?) I have the same problem in Windows 8.1 cmd and git bash. |
@artem-malko did you try with cmd.exe? |
@SBoudrias yeap. And it doesn't work in cmd.exe. I have 3 lists, so, the first one doesn't work, but other are fine. |
@artem-malko Looks like windows is not entering in the readline or tty mode... |
@SBoudrias so, what can I do or it is a bug of Inquirer? |
Looks like a Node.js bug. I'd like to have more details to give them to repro, but I don't really have the time to dig this one further. You should probably investigate the issue on your own (no need to use inquirer, just reproduce it using a Node readline) and report a bug on node. |
Yes it's a nodejs bug. I'm able to reproduce it only with readline. It is related to the keypress event that is not triggered correctly |
@maxdow so, what can I do with that? |
I tried to solve the issue but without success :/ I don't have the time to investigate more before next week. I think the best is to report an issue to node linked to this issue ( the same exist for angular formly and probably somewhere else ) and with a simple reproductible example. |
@maxdow can you post the steps you took to reproduce here? |
I can't have access to my windows machine until Monday. I will post you my test code. |
I wonder if maybe Node is not detecting the windows cli as a TTY on the first run. We could try to force it in TTY and then try if it still fails for you. |
@SBoudrias
I'll try to help somehow as that is a core component of |
my very hacky fix for this was to have a regular Y/N question that asked the user if they were ready to run my config.... this then allowed me to make the drop down be the second question. mean user has to hit enter (defaults to yes), but it works after that. I also wrapped this inside a check of if I was on windows so I only add this question if I need to. |
@leerlemoniii I did the same thing, but it is not good way) |
@SBoudrias
Tried CMD, Bash and PowerShell terminals. |
done ;) |
@maxdow @mzgol @SBoudrias @peterblazejewicz As I understand, we have to wait for new Node release? |
Probably, or use a patch with keypress on Inquirer.js .. |
@maxdow |
any update here? |
Anyone tried on the latest node? If it's not fixed yet, you should ping them on their bug thread. |
@SBoudrias I'll do this with LTS version. Thanks! |
@SBoudrias
The 5.1.1 works with CMD and PowerShell terminals. I was not able to get it worked with Bash terminal. |
Bash (like git bash and cie) terminals don't support readlines on Windows. They're very bad emulator. |
|
@LPGhatguy |
It appears to work in 5.3.0 for me -- thanks for pointing that out! |
@SBoudrias Thanks for the patience 🙇 |
Still not working for me. I thought this was solved by the Node JS team? Windows 10, |
There's a regression on the node side. The team is investigating. |
@SBoudrias is there any related issue I can follow? |
I have a module that helps identify broken versions of Node: Do you think it might be worth integrating a similar check into this library? So that a warning or something could be displayed? Or perhaps modifying the "engines" part of package.json to help avoid broken Node versions at installation time? |
Still broken in inquirer 8.2.0 node 16.13.1 on Windows 11 in a Terminal in VS Code |
Using Inquirer.js 0.9.0 and io.js 2.5.0 or Node 0.12.7 on Windows 10:
The arrow keys won't move the menu, allowing selection of only the first choice.
The text was updated successfully, but these errors were encountered: