-
-
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
Double key entry #109
Comments
You mean the npm being outputed after you exited? Or the line being duplicated at the beginning? |
Sorry, that video didn't turn out well. The line duplicated as well as when On Monday, April 28, 2014, Simon Boudrias notifications@github.com wrote:
|
Alright, I wonder if that's related to a new (non backward compat) Node release. The bug appeared without any update to the core of Inquirer. I'll have to check it out! |
@stephenplusplus Which generator is that with? I can see how that would happen if using the API incorrectly. |
generator-angular's latest release. On Monday, April 28, 2014, Daniel Chatfield notifications@github.com
|
I can't reproduce this, is there anything I'm missing? |
Hmm. $ node -v
v0.10.26
$ npm -v
1.4.3 Happens in Terminal and iTerm 2 for me. |
I tested it on iterm yesterday and I haven't been able to reproduce with node v0.10.26 on iTerm 2 But I had this bug on Windows powershell back at work... |
No luck on my windows machine with power shell either. I have a feeling this is going to be a tricky one to pin down. |
I'm experiencing the same issue with Node v.0.10.24 and Inquirer v0.5.1 on my Windows 8.1 machine. It just doubles every key stroke, but interestingly the value provided as answer is the proper data. So e.g. I enter ABC -> display == AABBCC, but the value nevertheless = ABC. EDIT:
So the readLine interface is interfering with Inquirer. Hope this helps to find out how to solve the bug. |
Any update on this? I'm seeing this issue on v.0.8 node 10.33. |
@rodriguise Did you ran on this issue using a yeoman-generator or running this repo examples? |
No running my own code
|
@rodriguise which prompt / operating system do you use? |
OS X 10.10, Terminal.app |
This behavior seems to be linked to the bottom bar. var ui = new inquirer.ui.BottomBar(); commenting that out it goes away. |
@rodriguise |
FWIW, I ran into the same issue when I when requiring (and using) Inquirer in two separate modules, both of which were being required by a third module. I resolved the issue temporarily by reducing it to a single |
Might be unrelated, but I ran into this when I instantiated two instances of |
@knownasilya Yes, that will effectively happen currently if two inquirer or readlines run at the same time. |
Got the same problem here with this piece of code:
It seems like the more there are instances of BottomBar, the more there are duplicates. Tested on |
I cannot reproduce in the latest release. I did some cleanup to events listeners a while ago, so that might just've fixed the issue. Either way, feel free to reopen if the issue still occurs for you. |
I am having the same issue.. |
Hey ! Same for me on windows10 with git bash (aka cygwin) and OSX terminal (using last LTS v8 nodejs and inquirer 5.2.0) |
Broken for me now, inquirer 6.0.0, node v10.6.0 |
Similar problem of duplicate output here. Working with nodejs v10.14.2 and inquirer 6.2.1 on Windows 7 Pro, x64. Project dependencies:
Sample output:
Tried both using
|
I did a work around for this bug, if you can't wait for a bug fix. Just decorate the original prompt function like this => const inquirer = require('inquirer');
const pause = duration => (new Promise(resolve => (
setTimeout(resolve, duration)
)));
const decoratedPrompt = async (...args) => {
const r = await inquirer.prompt.call(inquirer, ...args);
await pause(200);
return r;
}
module.exports = {
prompt: decoratedPrompt,
} ... Hope it may help some of you. |
I think the multiple character echo stems from multiple calls to readline.createInterface. If you have more than one module that does this, then you end up with the duplicate. Look for and eliminate any redundant calls to fix your problem. |
I'm not sure if this is an issue here or with the generator, but the ghost issue we had before has reappeared. Here's a gif to help me explain:
The text was updated successfully, but these errors were encountered: